-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notification) - Integrate In-App and Email Notifications
- Install required packages - Implement events to aid seamless trigerring of events - Write tests Finishes #162414278
- Loading branch information
Showing
57 changed files
with
1,158 additions
and
800 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ package-lock.json | |
|
||
# dotenv file | ||
.env | ||
client | ||
|
||
# personal files | ||
swagger.1.yaml |
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
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,22 @@ | ||
import { Strategy as TwitterStrategy } from 'passport-twitter'; | ||
import env from 'dotenv'; | ||
import UserController from '../../controllers/UserController'; | ||
import { MockStrategy } from '../../helpers/MockStrategy'; | ||
|
||
env.config(); | ||
|
||
const twitterStategy = new TwitterStrategy( | ||
{ | ||
consumerKey: process.env.TWITTER_CLIENT_ID, | ||
consumerSecret: process.env.TWITTER_CLIENT_SECRET, | ||
callbackURL: 'http://localhost:3000/api/v1/auth/twitter/callback', | ||
includeEmail: true | ||
}, | ||
UserController.strategyCallback | ||
); | ||
|
||
const mockStrategy = new MockStrategy('twitter', UserController.strategyCallback); | ||
/* istanbul ignore next */ | ||
const twitter = process.env.NODE_ENV === 'test' ? mockStrategy : twitterStategy; | ||
|
||
export default twitter; |
Oops, something went wrong.