chore: make lint happy

This commit is contained in:
CrescentLeaf
2025-10-08 00:55:09 +08:00
parent 7c7e641d1f
commit 11362a5689
6 changed files with 15 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ export type CallMethod =
"User.auth" |
"User.register" |
"User.login" |
"User.refreshAccessToken" |
"User.setAvatar" |
"User.updateProfile" |
@@ -17,6 +18,8 @@ export type CallMethod =
"Chat.getInfo" |
"Chat.createGroup" |
"Chat.getIdForPrivate" |
"Chat.getAnotherUserIdFromPrivate" |

View File

@@ -32,15 +32,15 @@ export default class TokenManager {
}
}
static make(user: User, time_: number | null | undefined, device_id: string, type: TokenType = "access_token") {
static make(user: User, time_: number | null | undefined, device_id: string, tokenType: TokenType = "access_token") {
const time = (time_ || Date.now())
return this.encode({
author: user.bean.id,
auth: this.makeAuth(user),
made_time: time,
expired_time: time + (type == 'access_token' ? (1000 * 60 * 60 * 2) : (40 * 1000 * 60 * 60 * 24)),
expired_time: time + (tokenType == 'access_token' ? (1000 * 60 * 60 * 2) : (40 * 1000 * 60 * 60 * 24)),
device_id: device_id,
type
type: tokenType
})
}
/**

View File

@@ -295,7 +295,7 @@ export default class UserApi extends BaseApi {
const chat = Chat.findById(id)
return {
id,
type: chat.bean.type,
type: chat?.bean.type,
title: chat?.getTitle(user) || "未知",
avatar: chat?.getAvatarFileHash(user) ? "uploaded_files/" + chat?.getAvatarFileHash(user) : undefined
}