mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-30 14:09:33 +02:00
fix: fix getToken function
This commit is contained in:
1 parent
5932ca6cf8
commit
4cac767c8e
1 file changed
+1
-1
@@ -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