fix: improvement access data

This commit is contained in:
ericprd
2025-03-14 13:00:12 +08:00
parent 11bc19360c
commit ee8e8e140d
7 changed files with 10 additions and 36 deletions
+1 -14
View File
@@ -59,20 +59,7 @@ func Create(
return
}
staffProfile, err := staffRepo.GetStaffByEmail(destructedToken.Email)
if err != nil {
response.ResponseWithErrorCode(
ctx,
w,
err,
response.ErrBadRequest.Code,
response.ErrBadRequest.HttpCode,
err.Error(),
)
return
}
if err := newsSvc.Create(spec, staffProfile.ID); err != nil {
if err := newsSvc.Create(spec, destructedToken.ID); err != nil {
response.ResponseWithErrorCode(
ctx,
w,