basicly implement acl crud ops with roles and resources
This commit is contained in:
@@ -65,7 +65,7 @@ type registerRequest struct {
|
||||
}
|
||||
|
||||
type registerResponse struct {
|
||||
UserID int64 `json:"id"`
|
||||
UserID uint `json:"id"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ func (h *authHandler) handleRegister(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Failed to encode response", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
}
|
||||
|
||||
type loginRequest struct {
|
||||
@@ -152,7 +153,7 @@ func (h *authHandler) handleLogout(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
type meResponse struct {
|
||||
UserID int64 `json:"id"`
|
||||
UserID uint `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user