mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
REST API: add location header to 201 responses
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -113,6 +113,7 @@ func addUser(w http.ResponseWriter, r *http.Request) {
|
||||
sendAPIResponse(w, r, err, "", getRespStatus(err))
|
||||
return
|
||||
}
|
||||
w.Header().Add("Location", fmt.Sprintf("%s/%s", userPath, user.Username))
|
||||
renderUser(w, r, user.Username, claims.Role, http.StatusCreated)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user