feat: Refactor user context handling and service methods
- Updated middleware to fetch user and tenant models by ID and set them in context. - Refactored common service methods to accept userID as a parameter instead of extracting from context. - Modified content service methods to include userID as a parameter for better clarity and performance. - Adjusted coupon, creator, notification, order, tenant, user, and wallet services to utilize userID directly. - Enhanced context key constants for improved readability and maintainability.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package consts
|
||||
|
||||
const (
|
||||
CtxKeyTenant = "tenant"
|
||||
CtxKeyClaims = "claims"
|
||||
CtxKeyUser = "user"
|
||||
CtxKeyTenantUser = "tenant_user"
|
||||
CtxKeyTenant = "__ctx_tenant"
|
||||
CtxKeyClaims = "__ctx_claims"
|
||||
CtxKeyUser = "__ctx_user"
|
||||
CtxKeyTenantUser = "__ctx_tenant_user"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user