add order and payment

This commit is contained in:
aditya.siregar
2024-06-04 02:59:31 +07:00
parent 8a23e72230
commit 4ae9079ff9
34 changed files with 810 additions and 1172 deletions
+6 -6
View File
@@ -56,14 +56,14 @@ func (h *Handler) Create(c *gin.Context) {
return
}
req.PartnerID = ctx.GetPartnerID()
if err := req.Validate(); err != nil {
response.ErrorWrapper(c, errors.ErrorInvalidRequest)
return
if !ctx.IsSuperAdmin() {
req.PartnerID = ctx.GetPartnerID()
if err := req.Validate(); err != nil {
response.ErrorWrapper(c, errors.ErrorInvalidRequest)
return
}
}
ctx.IsSuperAdmin()
res, err := h.service.Create(ctx, req.ToEntity())
if err != nil {
response.ErrorWrapper(c, err)