Implemented Collections, reworked SecureIds to prevent duplication across records, renamed files to be consistently plural.
This commit is contained in:
17
src/routes/collections.ts
Normal file
17
src/routes/collections.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { guard } from '../utilities/guard';
|
||||
import { Claims } from '../orm/claims';
|
||||
import collections from '../endpoints/collections';
|
||||
|
||||
export default {
|
||||
'/api/collection': {
|
||||
POST: guard(collections.create, [Claims.ADMIN, Claims.COLLECTIONS.CREATE]),
|
||||
},
|
||||
'/api/collection/:id': {
|
||||
GET: guard(collections.get, [Claims.ADMIN, Claims.COLLECTIONS.UNOWNED.READ, Claims.COLLECTIONS.OWNED.READ]),
|
||||
// PATCH: guard(collections.update, [Claims.ADMIN, Claims.PLAYERS.OTHER.UPDATE, Claims.PLAYERS.SELF.UPDATE]),
|
||||
// DELETE: guard(collections.drop, [Claims.ADMIN, Claims.PLAYERS.OTHER.DELETE, Claims.PLAYERS.SELF.DELETE]),
|
||||
},
|
||||
'/api/collection/list': {
|
||||
GET: guard(collections.list, [Claims.ADMIN, Claims.COLLECTIONS.OWNED.LIST]),
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user