Skip to content
Snippets Groups Projects
Commit a6cd97ca authored by syuilo's avatar syuilo
Browse files

fix(backend): 「アクセストークンの管理」画面でアプリの情報が表示されない問題を修正

Fix #10920
parent a4a17178
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,9 @@
- アカウントの初期設定ウィザードにあとでボタンを追加
- Fix: URLプレビューで情報が取得できなかった際の挙動を修正
- Fix: Safari、Firefoxでの新規登録時、パスワードマネージャーにメールアドレスが登録されていた挙動を修正
- fix:ロールタイムラインが無効でも投稿が流れてしまう問題の修正
- fix:ロールタイムラインにて全ての投稿が流れてしまう問題の修正
- Fix: ロールタイムラインが無効でも投稿が流れてしまう問題の修正
- Fix: ロールタイムラインにて全ての投稿が流れてしまう問題の修正
- Fix: 「アクセストークンの管理」画面でアプリの情報が表示されない問題の修正
### Server
- bullをbull-mqにアップグレードし、ジョブキューのパフォーマンスを改善
......
......@@ -55,7 +55,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchSession);
}
// Generate access token
const accessToken = secureRndstr(32, true);
// Fetch exist access token
......@@ -65,7 +64,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
});
if (exist == null) {
// Lookup app
const app = await this.appsRepository.findOneByOrFail({ id: session.appId });
// Generate Hash
......@@ -75,7 +73,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
const now = new Date();
// Insert access token doc
await this.accessTokensRepository.insert({
id: this.idService.genId(),
createdAt: now,
......
......@@ -26,7 +26,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
) {
super(meta, paramDef, async (ps, me) => {
const query = this.accessTokensRepository.createQueryBuilder('token')
.where('token.userId = :userId', { userId: me.id });
.where('token.userId = :userId', { userId: me.id })
.leftJoinAndSelect('token.app', 'app');
switch (ps.sort) {
case '+createdAt': query.orderBy('token.createdAt', 'DESC'); break;
......@@ -40,7 +41,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
return await Promise.all(tokens.map(token => ({
id: token.id,
name: token.name,
name: token.name ?? token.app?.name,
createdAt: token.createdAt,
lastUsedAt: token.lastUsedAt,
permission: token.permission,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment