Skip to content

Commit

Permalink
Merge pull request #268 from cho4036/develop
Browse files Browse the repository at this point in the history
bug fix: missing JWT function
  • Loading branch information
seungkyua authored Mar 6, 2024
2 parents b9e054c + 4c49b83 commit 070fcc7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/delivery/http/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func NewPermissionHandler(usecase usecase.Usecase) *PermissionHandler {
// @Produce json
// @Success 200 {object} domain.PermissionSet
// @Router /permissions/templates [get]
// @Security JWT

func (h PermissionHandler) GetPermissionTemplates(w http.ResponseWriter, r *http.Request) {
permissionSet := domain.NewDefaultPermissionSet()

Expand All @@ -54,7 +56,9 @@ func (h PermissionHandler) GetPermissionTemplates(w http.ResponseWriter, r *http
// @Accept json
// @Produce json
// @Success 200 {object} domain.PermissionSet
// @Router /roles/{roleId}/permissions [get]
// @Router organizations/{organizationId}/roles/{roleId}/permissions [get]
// @Security JWT

func (h PermissionHandler) GetPermissionsByRoleId(w http.ResponseWriter, r *http.Request) {
// path parameter
var roleId string
Expand Down Expand Up @@ -93,7 +97,9 @@ func (h PermissionHandler) GetPermissionsByRoleId(w http.ResponseWriter, r *http
// @Param roleId path string true "Role ID"
// @Param body body domain.UpdatePermissionsByRoleIdRequest true "Update Permissions By Role ID Request"
// @Success 200
// @Router /roles/{roleId}/permissions [put]
// @Router organizations/{organizationId}/roles/{roleId}/permissions [put]
// @Security JWT

func (h PermissionHandler) UpdatePermissionsByRoleId(w http.ResponseWriter, r *http.Request) {
// path parameter
log.Debug("UpdatePermissionsByRoleId Called")
Expand Down
6 changes: 6 additions & 0 deletions internal/delivery/http/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewRoleHandler(usecase usecase.Usecase) *RoleHandler {
// @Param body body domain.CreateTksRoleRequest true "Create Tks Role Request"
// @Success 200 {object} domain.CreateTksRoleResponse
// @Router /organizations/{organizationId}/roles [post]
// @Security JWT

func (h RoleHandler) CreateTksRole(w http.ResponseWriter, r *http.Request) {
// path parameter
Expand Down Expand Up @@ -101,6 +102,8 @@ func (h RoleHandler) CreateTksRole(w http.ResponseWriter, r *http.Request) {
// @Param organizationId path string true "Organization ID"
// @Success 200 {object} domain.ListTksRoleResponse
// @Router /organizations/{organizationId}/roles [get]
// @Security JWT

func (h RoleHandler) ListTksRoles(w http.ResponseWriter, r *http.Request) {
// path parameter
var organizationId string
Expand Down Expand Up @@ -155,6 +158,7 @@ func (h RoleHandler) ListTksRoles(w http.ResponseWriter, r *http.Request) {
// @Param roleId path string true "Role ID"
// @Success 200 {object} domain.GetTksRoleResponse
// @Router /organizations/{organizationId}/roles/{roleId} [get]
// @Security JWT

func (h RoleHandler) GetTksRole(w http.ResponseWriter, r *http.Request) {
// path parameter
Expand Down Expand Up @@ -196,6 +200,7 @@ func (h RoleHandler) GetTksRole(w http.ResponseWriter, r *http.Request) {
// @Param roleId path string true "Role ID"
// @Success 200
// @Router /organizations/{organizationId}/roles/{roleId} [delete]
// @Security JWT

func (h RoleHandler) DeleteTksRole(w http.ResponseWriter, r *http.Request) {
// path parameter
Expand Down Expand Up @@ -229,6 +234,7 @@ func (h RoleHandler) DeleteTksRole(w http.ResponseWriter, r *http.Request) {
// @Param body body domain.UpdateTksRoleRequest true "Update Tks Role Request"
// @Success 200
// @Router /organizations/{organizationId}/roles/{roleId} [put]
// @Security JWT

func (h RoleHandler) UpdateTksRole(w http.ResponseWriter, r *http.Request) {
// path parameter
Expand Down

0 comments on commit 070fcc7

Please sign in to comment.