Fix issue of import LDAP user 404 message

Some user requires return json format message in 404
This commit is contained in:
stonezdj 2018-05-11 15:33:35 +08:00
parent cf79e9ee8d
commit 931e17330c

View File

@ -118,7 +118,8 @@ func (l *LdapAPI) ImportUser() {
}
if len(ldapFailedImportUsers) > 0 {
l.HandleNotFound("Import LDAP user is not found")
//Some user require json format response.
l.HandleNotFound("")
l.Data["json"] = ldapFailedImportUsers
l.ServeJSON()
return