mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-12 18:32:44 +00:00
fix: fix getToken function
This commit is contained in:
@@ -52,7 +52,7 @@ export default abstract class GitHubBase {
|
||||
}
|
||||
|
||||
async getToken() {
|
||||
const user = await UserModel.findOne({ id: this.repository.owner.id });
|
||||
const user = await UserModel.findById(this.repository.owner.id);
|
||||
if (user && user.accessTokens.github) {
|
||||
return user.accessTokens.github as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user