mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-06-08 08:33:55 +02:00
fix: fix getToken function
This commit is contained in:
@@ -52,7 +52,7 @@ export default abstract class GitHubBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getToken() {
|
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) {
|
if (user && user.accessTokens.github) {
|
||||||
return user.accessTokens.github as string;
|
return user.accessTokens.github as string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user