This commit is contained in:
Aditya Siregar
2025-09-01 12:06:14 +07:00
parent 2bdce63852
commit aa662a321f
25 changed files with 2923 additions and 189 deletions
+1
View File
@@ -41,6 +41,7 @@ func (m *AuthMiddleware) RequireAuth() gin.HandlerFunc {
}
setKeyInContext(c, appcontext.UserIDKey, userResponse.ID.String())
setKeyInContext(c, appcontext.UserNameKey, userResponse.Name)
if len(userResponse.DepartmentResponse) > 0 {
departmentID := userResponse.DepartmentResponse[0].ID.String()
setKeyInContext(c, appcontext.DepartmentIDKey, departmentID)