generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: API to sync in_discord role with discord members and add joined…
…_discord date (#1097) * feat: sync-indiscord role * test: fix failing test * chore: rename variable * feat: implement background worker using bull * feat: sync in_discord API * chore: remove commented code and add comments * chore : remove test * Update users.js * chore: fix prettier issue * chore: address PR comments * chore: remove id from update data * remove bull and unwanted code * remove unwanted changes from controller * temporary commit * remove yarn lock changes * add filter queries * rename controll for better understanding * remove changes made to levels api * add tests for returning discord users * make the api only for superuser * fix authorizeroles function call * store user.data() in a variable to reuse * rename controller --------- Co-authored-by: ritikjaiswal75 <[email protected]>
- Loading branch information
1 parent
24dd9b7
commit 5cd5815
Showing
5 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module.exports = () => { | ||
return [ | ||
{ | ||
discordId: "1234567890987543", | ||
first_name: "jhon", | ||
last_name: "doe", | ||
username: "jhon-doe", | ||
github_id: "jhon-doe", | ||
github_display_name: "jhon-doe", | ||
incompleteUserDetails: false, | ||
roles: { | ||
archived: false, | ||
in_discord: true, | ||
}, | ||
tokens: { | ||
githubAccessToken: "weuytrertyuiiuyrtyui4567yyyuyghy", | ||
}, | ||
}, | ||
{ | ||
discordId: "8494597689576953", | ||
first_name: "test", | ||
last_name: "user", | ||
username: "test-user", | ||
github_id: "test-user", | ||
github_display_name: "test-user", | ||
incompleteUserDetails: false, | ||
roles: { | ||
archived: false, | ||
in_discord: false, | ||
}, | ||
tokens: { | ||
githubAccessToken: "weuytrertyuiiuyrtyui4567yyyuyghy", | ||
}, | ||
}, | ||
{ | ||
first_name: "test", | ||
last_name: "user", | ||
username: "test-user", | ||
github_id: "test-user", | ||
github_display_name: "test-user", | ||
incompleteUserDetails: false, | ||
roles: { | ||
archived: false, | ||
in_discord: false, | ||
}, | ||
tokens: { | ||
githubAccessToken: "weuytrertyuiiuyrtyui4567yyyuyghy", | ||
}, | ||
}, | ||
]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters