mirror of
https://github.com/strapi/strapi.git
synced 2025-08-07 08:16:35 +00:00
update testing (remove all later)
This commit is contained in:
parent
e28c9e7ec9
commit
4f46d57de0
@ -19,19 +19,24 @@ module.exports = {
|
||||
async bootstrap({ strapi }) {
|
||||
// Delete tokens
|
||||
// const tokens = await strapi.admin.services['api-token'].list();
|
||||
// console.log('tokens', tokens);
|
||||
// const promises = [];
|
||||
// tokens.forEach(({ id }) => {
|
||||
// promises.push(strapi.admin.services['api-token'].revoke(id));
|
||||
// });
|
||||
// await Promise.all(promises);
|
||||
// Create a token
|
||||
// // Create a token
|
||||
// const payload = {
|
||||
// type: 'custom',
|
||||
// permissions: ['api::restaurant.create'],
|
||||
// permissions: ['api::restaurant.restaurant.find'],
|
||||
// name: 'custom token v2',
|
||||
// };
|
||||
// const token = await strapi.admin.services['api-token'].create(payload);
|
||||
// console.log('custom-before', JSON.stringify(token, null, 2));
|
||||
// // TODO: Really need to allow update without full permissions array!
|
||||
// await strapi.admin.services['api-token'].update(token.id, {
|
||||
// lastUsed: new Date(),
|
||||
// });
|
||||
// const updatedToken = await strapi.admin.services['api-token'].update(token.id, {
|
||||
// description: 'foobar',
|
||||
// permissions: ['api::restaurant.restaurant.find', 'api::restaurant.restaurant.findOne'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user