diff --git a/audio.mp3 b/audio.mp3 index d4e35ec..e872d52 100644 Binary files a/audio.mp3 and b/audio.mp3 differ diff --git a/audio.wav b/audio.wav index 86ce680..358c004 100644 Binary files a/audio.wav and b/audio.wav differ diff --git a/core/src/hooks/block-self-delete.ts b/core/src/hooks/block-self-delete.ts new file mode 100644 index 0000000..48a34fb --- /dev/null +++ b/core/src/hooks/block-self-delete.ts @@ -0,0 +1,10 @@ +// Use this hook to manipulate incoming or outgoing data. +// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html +import { Hook, HookContext } from '@feathersjs/feathers'; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export default (options = {}): Hook => { + return async (context: HookContext): Promise => { + return context; + }; +}; diff --git a/core/src/services/admin/admin.hooks.ts b/core/src/services/admin/admin.hooks.ts index 4330229..481d924 100644 --- a/core/src/services/admin/admin.hooks.ts +++ b/core/src/services/admin/admin.hooks.ts @@ -1,5 +1,7 @@ import { HooksObject } from '@feathersjs/feathers'; import * as authentication from '@feathersjs/authentication'; +import RolesEnum from '../../constants/roles.enum'; +import Permit from '../../hooks/permit'; // Don't remove this comment. It's needed to format import lines nicely. const { authenticate } = authentication.hooks; @@ -9,10 +11,10 @@ export default { all: [ authenticate('jwt') ], find: [], get: [], - create: [], + create: [Permit(RolesEnum.PLATFORM_SUPER_ADMIN)], update: [], patch: [], - remove: [] + remove: [Permit(RolesEnum.PLATFORM_SUPER_ADMIN)] }, after: {