chores: refactor struct and structure project
This commit is contained in:
@@ -2,7 +2,7 @@ package authhttp
|
||||
|
||||
import (
|
||||
"errors"
|
||||
authdomain "legalgo-BE-go/internal/domain/auth"
|
||||
staffdomain "legalgo-BE-go/internal/domain/staff"
|
||||
authsvc "legalgo-BE-go/internal/services/auth"
|
||||
"legalgo-BE-go/internal/utilities/response"
|
||||
"legalgo-BE-go/internal/utilities/utils"
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
func UpdateStaff(
|
||||
router chi.Router,
|
||||
authSvc authsvc.AuthIntf,
|
||||
authSvc authsvc.Auth,
|
||||
) {
|
||||
router.Patch("/staff/{id}/update", func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -31,7 +31,7 @@ func UpdateStaff(
|
||||
return
|
||||
}
|
||||
|
||||
var spec authdomain.RegisterStaffReq
|
||||
var spec staffdomain.StaffRegister
|
||||
|
||||
if err := utils.UnmarshalBody(r, &spec); err != nil {
|
||||
response.ResponseWithErrorCode(
|
||||
@@ -45,7 +45,7 @@ func UpdateStaff(
|
||||
return
|
||||
}
|
||||
|
||||
staff := authdomain.Staff{
|
||||
staff := staffdomain.Staff{
|
||||
ID: id,
|
||||
Email: spec.Email,
|
||||
Password: spec.Password,
|
||||
|
||||
Reference in New Issue
Block a user