Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed isUnderMaintenance middleware from all GET requests #224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/routes/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const auth = require('../middleware/auth')
// get a User activity
router.get(
'/user/:id',
isUnderMaintenance,
auth,
activityController.getActivity
)
Expand Down
1 change: 0 additions & 1 deletion app/routes/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ router.patch(
// GET COMMENT BY POST ID
router.get(
'/:id',
isUnderMaintenance,
auth,
commentController.getCommentByPost
)
Expand Down
4 changes: 0 additions & 4 deletions app/routes/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ const isUnderMaintenance = require('../middleware/maintenance')
// get all the events
router.get(
'/all',
isUnderMaintenance,
auth,
eventController.GetAllEvent
)

// get all the events
router.get(
'/upcoming',
isUnderMaintenance,
auth,
eventController.UpComingEvents
)
Expand All @@ -30,7 +28,6 @@ router.post(
// get event by id
router.get(
'/:id',
isUnderMaintenance,
auth,
eventController.GetEventById
)
Expand Down Expand Up @@ -59,7 +56,6 @@ router.delete(
// GET ALL EVENT POSTED BY A USER
router.get(
'/:id/all',
isUnderMaintenance,
auth,
eventController.getAllEventByUser
)
Expand Down
4 changes: 0 additions & 4 deletions app/routes/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,27 @@ const notificationController = require('../controllers/notification')
// GET NOTIFICATIONS FOR ALL
router.get(
'/org/all',
isUnderMaintenance,
auth,
notificationController.getOrgNotifications
)

// GET NOTIFICATIONS FOR LOGGED IN USER
router.get(
'/user/all',
isUnderMaintenance,
auth,
notificationController.getUserNotification
)

// GET NOTICATIONS FOR PROPOSALS
router.get(
'/proposal/all',
isUnderMaintenance,
auth,
notificationController.getProposalNotifications
)

// GET TICKET NOTIFICATIONS FOR LOGGED IN USER
router.get(
'/ticket/user/all',
isUnderMaintenance,
auth,
notificationController.getTicketNotifications
)
Expand Down
2 changes: 0 additions & 2 deletions app/routes/organisation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ router.post(
// GET ORG DETAILS BY ID
router.get(
'/:id',
isUnderMaintenance,
auth,
OrgController.getOrgDetailsById
)
Expand Down Expand Up @@ -89,7 +88,6 @@ router.patch(
// GET ORG LOGIN OPTIONS (CALLED JUST BEFORE LOGIN)
router.get(
'/login/options',
isUnderMaintenance,
OrgController.getOrgLoginOptions
)

Expand Down
4 changes: 0 additions & 4 deletions app/routes/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ router.post(
// GET ALL POSTS
router.get(
'/all_posts',
isUnderMaintenance,
auth,
postController.getAllPost
)
Expand All @@ -46,7 +45,6 @@ router.delete(
// GET POST BY ID
router.get(
'/:id',
isUnderMaintenance,
auth,
postController.getPostById
)
Expand Down Expand Up @@ -77,15 +75,13 @@ router.get(
// PIN THE POST
router.patch(
'/pin/:id/',
isUnderMaintenance,
auth,
postController.pinPost
)

// GET ALL PINNED POSTS
router.get(
'/all/pinned/',
isUnderMaintenance,
auth,
postController.getPinned
)
Expand Down
3 changes: 0 additions & 3 deletions app/routes/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ router.post(
// GET ALL PROJECTS
router.get(
'/',
isUnderMaintenance,
auth,
projectController.getAllProjects
)

// GET PROJECT BY ID
router.get(
'/:id',
isUnderMaintenance,
auth,
projectController.getProjectById
)
Expand All @@ -47,7 +45,6 @@ router.delete(
// GET PROJECTS CREATED BY A USER
router.get(
'/:id/all',
isUnderMaintenance,
auth,
projectController.projectCreatedByUser
)
Expand Down
4 changes: 0 additions & 4 deletions app/routes/ticket.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ router.post(
// GET ALL TICKETS (Brief)
router.get(
'/',
isUnderMaintenance,
auth,
ticketController.getTicket
)

// GET TICKET (ALL DETAILS)
router.get(
'/:id',
isUnderMaintenance,
auth,
ticketController.getTicketFull
)
Expand Down Expand Up @@ -74,7 +72,6 @@ router.post(
// GET TICKET COMMENTS BY TICKET ID
router.get(
'/:id/comments',
isUnderMaintenance,
auth,
ticketController.getComments
)
Expand Down Expand Up @@ -113,7 +110,6 @@ router.post(
// GET ALL TICKET MODERATORS
router.get(
'/moderator',
isUnderMaintenance,
auth,
ticketController.getModerators
)
Expand Down
12 changes: 1 addition & 11 deletions app/routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ router.post(
// load user (endpoint used to call when someone opens app)
router.get(
'/load_user',
isUnderMaintenance,
auth,
userController.loadUser
)

// get user profile
router.get(
'/:id',
isUnderMaintenance,
auth,
userController.userProfile
)
Expand Down Expand Up @@ -56,22 +54,19 @@ router.patch(
// get invite link (for sender)
router.get(
'/link/invite',
isUnderMaintenance,
auth,
userController.getInviteLink
)

// process invite link (for receiver)
router.get(
'/invite/:token',
isUnderMaintenance,
userController.processInvite
)

// activate account
router.get(
'/activate/:token',
isUnderMaintenance,
userController.activateAccount
)

Expand Down Expand Up @@ -127,8 +122,7 @@ router.patch(
// GET PERSONAL OVERVIEW
router.get(
'/me/overview',
isUnderMaintenance,
auth,
auth,
userController.getPersonalOverview
)

Expand All @@ -151,30 +145,26 @@ router.patch(
// Redirect user to Google Accounts
router.get(
'/auth/google',
isUnderMaintenance,
isOAuthAllowed,
OAuthMiddlewares.passportGoogleAuthenticate
)

// Receive Callback from Google Accounts after successful Auth
router.get(
'/auth/google/callback',
isUnderMaintenance,
isOAuthAllowed,
OAuthMiddlewares.passportGoogleAuthenticateCallback
)

// Redirect user to GitHub Accounts
router.get(
'/auth/github',
isUnderMaintenance,
isOAuthAllowed,
OAuthMiddlewares.passportGitHubAuthenticate
)
// Receive Callback from GitHub Accounts after successful Auth
router.get(
'/auth/github/callback',
isUnderMaintenance,
isOAuthAllowed,
OAuthMiddlewares.passportGitHubAuthenticateCallback
)
Expand Down
4 changes: 0 additions & 4 deletions app/routes/wikis.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@ const isUnderMaintenance = require('../middleware/maintenance')

router.get(
'/',
isUnderMaintenance,
auth,
wikisController.getWikis
)

router.get(
'/oauth-callback',
isUnderMaintenance,
wikisController.oauthCallback
)

router.get(
'/oauth-check',
isUnderMaintenance,
auth,
wikisController.oauthCheck
)

router.get(
'/pages',
isUnderMaintenance,
auth, wikisController.getPage
)

Expand Down
Loading