Skip to content

Conversation

@daffa-fawwaz
Copy link
Member

No description provided.

Copy link
Member

@andynur andynur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jangan lupa tambahan user id, name, role dan list permissions / access setelah login

}

func (r *userRepository) AssignUserRole(ctx context.Context, userRole *entities.UserRole) error {
// Cek apakah user sudah punya role ini
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minta ai nya jgn ada komen-komen bhs indo kek begini, klo pun perlu pke bahas inggris.. berlau di kode-kode lain yak..

api.Get("/users", middleware.AdminMiddleware, userController.GetAllUsers)
api.Get("/users/:id", middleware.AuthMiddleware, userController.GetUserByID)

api.Post("/users/:id/role", middleware.AdminMiddleware, userController.SetUserRole)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untuk user profile kasih /profile sendiri agar terpisah dan dia mengambil user id yg login otomatis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants