mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
🐛 fix route for creating api key
This commit is contained in:
parent
0beb728f32
commit
be8d2c594e
|
@ -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}`;
|
||||||
|
|
Loading…
Reference in a new issue