This commit is contained in:
@@ -290,8 +290,8 @@ func registerSpaceThroughDWS(w http.ResponseWriter, r *http.Request, config Conf
|
||||
})
|
||||
switch {
|
||||
case errors.Is(err, postgresstore.ErrDingtalkSpaceNameTaken):
|
||||
writeJSON(w, http.StatusOK, map[string]any{"data": map[string]string{"name": name, "already_present": "true"}})
|
||||
return true, true
|
||||
writeJSON(w, http.StatusConflict, map[string]string{"error": "space_name_conflict", "hint": "已有同名来源,但空间标识不一致;请核对已有来源,不能按名称判定添加成功。"})
|
||||
return true, false
|
||||
case errors.Is(err, postgresstore.ErrDingtalkSpaceIdentityConflict):
|
||||
writeJSON(w, http.StatusConflict, map[string]string{
|
||||
"error": "space_identity_conflict",
|
||||
|
||||
Reference in New Issue
Block a user