chores: refactor struct and structure project

This commit is contained in:
ericprd
2025-03-05 21:21:44 +08:00
parent 13a8481f22
commit 567e0e32ca
103 changed files with 1125 additions and 731 deletions
+4 -4
View File
@@ -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,