Spaces:
Running
Running
File size: 463 Bytes
b39afbe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
/**
* Copyright (c) 2023 MERCENARIES.AI PTE. LTD.
* All rights reserved.
*/
const script = {
name: 'revokeKey',
exec: async function (ctx, payload) {
const apiNamespace = payload['0']
const tokenType = payload['1']
const credentialService = ctx.app.services.get('credentials')
const response = await credentialService.revokeUserCredentials(ctx.user, apiNamespace, tokenType)
return { answer: response }
}
}
export default script
|