Skip to content

Commit

Permalink
bug: command permissions not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahcks committed Aug 15, 2024
1 parent 03917cb commit 09b376e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/rest/v1/routes/commands/get.commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,16 @@ func (rg *RouteGroup) GetCommandByName(ctx *respond.Ctx) error {
return errors.ErrInternalServerError().SetDetail(err.Error())
}

// Retrieve permissions
convertedPermissions, err := utils.ConvertJSONStringToSlice(storedDefaultCommand.Permissions)
if err != nil {
return errors.ErrInternalServerError().SetDetail(err.Error())
}

command := domain.Command{
Name: storedDefaultCommand.Name,
Aliases: convertedAliases,
Permissions: convertToPermissions(convertedPermissions),
Description: storedDefaultCommand.Description,
DynamicDescription: convertedDynamicDescription,
GlobalCooldown: storedDefaultCommand.GlobalCooldown,
Expand Down

0 comments on commit 09b376e

Please sign in to comment.