mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 19:59:34 +08:00
fix: fixed migration script bugs (#2718)
This commit is contained in:
@@ -32,7 +32,15 @@ function isOldSSOKey(key: SSOKey | OldSSOKey): key is OldSSOKey {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
if ((key as OldSSOKey).deprecateAt) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((key as OldSSOKey).deletedAt) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
interface OldTenant {
|
||||
|
||||
+2
-2
@@ -261,7 +261,7 @@ export default class TenantCache {
|
||||
/**
|
||||
* onMessage is fired every time the client gets a subscription event.
|
||||
*/
|
||||
private async onMessage(channel: string, data: string): Promise<void> {
|
||||
private onMessage = async (channel: string, data: string): Promise<void> => {
|
||||
// Only do things when the message is for tenant.
|
||||
if (channel !== TENANT_CACHE_CHANNEL) {
|
||||
return;
|
||||
@@ -299,7 +299,7 @@ export default class TenantCache {
|
||||
"an error occurred while trying to handle a message"
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public async retrieveByID(id: string): Promise<Readonly<Tenant> | null> {
|
||||
return this.tenantsByID.load(id);
|
||||
|
||||
Reference in New Issue
Block a user