fix (backend): set name and description for Mastodon API tokens

This commit is contained in:
naskya 2024-07-28 11:25:50 +09:00
parent ea48a77dac
commit 0fcb17d9b6
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -107,6 +107,8 @@ export class AuthHelpers {
const createdAt = new Date(); const createdAt = new Date();
const id = genIdAt(createdAt); const id = genIdAt(createdAt);
const token = await AccessTokens.insert({ const token = await AccessTokens.insert({
name: app.name,
description: app.description,
id, id,
token: secret, token: secret,
hash: secret, hash: secret,
@ -185,6 +187,8 @@ export class AuthHelpers {
const id = genIdAt(createdAt); const id = genIdAt(createdAt);
const secret = generateSecureRandomString(32); const secret = generateSecureRandomString(32);
const token = await AccessTokens.insert({ const token = await AccessTokens.insert({
name: app.name,
description: app.description,
id, id,
token: secret, token: secret,
hash: secret, hash: secret,