Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi committed May 7, 2024
1 parent 59bb88e commit 8aa3506
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions src/controllers/handlers/permissions-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,20 @@ export async function putPermissionsAddressHandler(

await permissionsManager.addAddressToAllowList(worldName, permissionName, lowerCaseAddress)

await notificationService.sendNotifications([{
type: NotificationType.WORLDS_PERMISSION_GRANTED,
eventKey: randomUUID(),
address: lowerCaseAddress,
metadata: {
title: 'Worlds permission granted',
description: `You have been granted ${permissionName} permission for world ${worldName}`,
world: worldName,
permission: permissionName
},
timestamp: Date.now()
}])
await notificationService.sendNotifications([
{
type: NotificationType.WORLDS_PERMISSION_GRANTED,
eventKey: randomUUID(),
address: lowerCaseAddress,
metadata: {
title: 'Worlds permission granted',
description: `You have been granted ${permissionName} permission for world ${worldName}`,
world: worldName,
permissions: [permissionName]
},
timestamp: Date.now()
}
])

return {
status: 204
Expand Down Expand Up @@ -237,18 +239,20 @@ export async function deletePermissionsAddressHandler(

await permissionsManager.deleteAddressFromAllowList(worldName, permissionName, lowerCaseAddress)

await notificationService.sendNotifications([{
type: NotificationType.WORLDS_PERMISSION_REVOKED,
eventKey: randomUUID(),
address: lowerCaseAddress,
metadata: {
title: 'World permission revoked',
description: `Your ${permissionName} permission for world ${worldName} has been revoked`,
world: worldName,
permissions: [permissionName]
},
timestamp: Date.now()
}])
await notificationService.sendNotifications([
{
type: NotificationType.WORLDS_PERMISSION_REVOKED,
eventKey: randomUUID(),
address: lowerCaseAddress,
metadata: {
title: 'World permission revoked',
description: `Your ${permissionName} permission for world ${worldName} has been revoked`,
world: worldName,
permissions: [permissionName]
},
timestamp: Date.now()
}
])

return {
status: 204
Expand Down

0 comments on commit 8aa3506

Please sign in to comment.