mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
refactor(server): use user model on oauth plugin (#10031)
close CLOUD-117
This commit is contained in:
@@ -241,9 +241,13 @@ export class UserModel extends BaseModel {
|
||||
// #region ConnectedAccount
|
||||
|
||||
async createConnectedAccount(data: CreateConnectedAccountInput) {
|
||||
return await this.db.connectedAccount.create({
|
||||
const account = await this.db.connectedAccount.create({
|
||||
data,
|
||||
});
|
||||
this.logger.log(
|
||||
`Connected account ${account.provider}:${account.id} created`
|
||||
);
|
||||
return account;
|
||||
}
|
||||
|
||||
async getConnectedAccount(provider: string, providerAccountId: string) {
|
||||
|
||||
Reference in New Issue
Block a user