Use id param in /sync-ldap-users API

This commit is contained in:
Yang Luo 2023-07-13 00:14:18 +08:00
parent 0a0c1b4788
commit 666ff48837

View File

@ -226,8 +226,9 @@ func (c *ApiController) DeleteLdap() {
// @Title SyncLdapUsers
// @router /sync-ldap-users [post]
func (c *ApiController) SyncLdapUsers() {
owner := c.Input().Get("owner")
ldapId := c.Input().Get("ldapId")
id := c.Input().Get("id")
owner, ldapId := util.GetOwnerAndNameFromId(id)
var users []object.LdapUser
err := json.Unmarshal(c.Ctx.Input.RequestBody, &users)
if err != nil {