🐛 fix route for creating api key

This commit is contained in:
Ben Hesseldieck 2022-04-28 12:08:16 +02:00
parent 0beb728f32
commit be8d2c594e

View file

@ -157,7 +157,7 @@ export function meNamespace(this: N8nApp): void {
* Creates an API Key * Creates an API Key
*/ */
this.app.post( this.app.post(
`/${this.restEndpoint}/users/me/api-key`, `/${this.restEndpoint}/me/api-key`,
ResponseHelper.send(async (req: AuthenticatedRequest) => { ResponseHelper.send(async (req: AuthenticatedRequest) => {
const ramdonToken = randomBytes(40).toString('hex'); const ramdonToken = randomBytes(40).toString('hex');
const apiKey = `n8n_api_${ramdonToken}`; const apiKey = `n8n_api_${ramdonToken}`;