Finished /web redirects/URLs
Caught a few redirects; moved the whole tree under a subRoute instead of having /web everywhere
This commit is contained in:
parent
da134318d8
commit
e8c3458e57
@ -61,26 +61,28 @@ module Configure =
|
|||||||
/// Routes for PrayerTracker
|
/// Routes for PrayerTracker
|
||||||
let webApp =
|
let webApp =
|
||||||
router Handlers.CommonFunctions.fourOhFour [
|
router Handlers.CommonFunctions.fourOhFour [
|
||||||
|
// Traditional web app routes
|
||||||
|
subRoute"/web" [
|
||||||
GET [
|
GET [
|
||||||
subRoute "/web/church" [
|
subRoute "/church" [
|
||||||
route "es" Handlers.Church.maintain
|
route "es" Handlers.Church.maintain
|
||||||
routef "/%O/edit" Handlers.Church.edit
|
routef "/%O/edit" Handlers.Church.edit
|
||||||
]
|
]
|
||||||
route "/web/class/logon" (redirectTo true "/small-group/log-on")
|
route "/class/logon" (redirectTo true "/web/small-group/log-on")
|
||||||
routef "/web/error/%s" Handlers.Home.error
|
routef "/error/%s" Handlers.Home.error
|
||||||
routef "/web/language/%s" Handlers.Home.language
|
routef "/language/%s" Handlers.Home.language
|
||||||
subRoute "/web/legal" [
|
subRoute "/legal" [
|
||||||
route "/privacy-policy" Handlers.Home.privacyPolicy
|
route "/privacy-policy" Handlers.Home.privacyPolicy
|
||||||
route "/terms-of-service" Handlers.Home.tos
|
route "/terms-of-service" Handlers.Home.tos
|
||||||
]
|
]
|
||||||
route "/web/log-off" Handlers.Home.logOff
|
route "/log-off" Handlers.Home.logOff
|
||||||
subRoute "/web/prayer-request" [
|
subRoute "/prayer-request" [
|
||||||
route "s" (Handlers.PrayerRequest.maintain true)
|
route "s" (Handlers.PrayerRequest.maintain true)
|
||||||
routef "s/email/%s" Handlers.PrayerRequest.email
|
routef "s/email/%s" Handlers.PrayerRequest.email
|
||||||
route "s/inactive" (Handlers.PrayerRequest.maintain false)
|
route "s/inactive" (Handlers.PrayerRequest.maintain false)
|
||||||
route "s/lists" Handlers.PrayerRequest.lists
|
route "s/lists" Handlers.PrayerRequest.lists
|
||||||
routef "s/%O/list" Handlers.PrayerRequest.list
|
routef "s/%O/list" Handlers.PrayerRequest.list
|
||||||
route "s/maintain" (redirectTo true "/prayer-requests")
|
route "s/maintain" (redirectTo true "/web/prayer-requests")
|
||||||
routef "s/print/%s" Handlers.PrayerRequest.print
|
routef "s/print/%s" Handlers.PrayerRequest.print
|
||||||
route "s/view" (Handlers.PrayerRequest.view None)
|
route "s/view" (Handlers.PrayerRequest.view None)
|
||||||
routef "s/view/%s" (Some >> Handlers.PrayerRequest.view)
|
routef "s/view/%s" (Some >> Handlers.PrayerRequest.view)
|
||||||
@ -88,40 +90,39 @@ module Configure =
|
|||||||
routef "/%O/expire" Handlers.PrayerRequest.expire
|
routef "/%O/expire" Handlers.PrayerRequest.expire
|
||||||
routef "/%O/restore" Handlers.PrayerRequest.restore
|
routef "/%O/restore" Handlers.PrayerRequest.restore
|
||||||
]
|
]
|
||||||
subRoute "/web/small-group" [
|
subRoute "/small-group" [
|
||||||
route "" Handlers.SmallGroup.overview
|
route "" Handlers.SmallGroup.overview
|
||||||
route "s" Handlers.SmallGroup.maintain
|
route "s" Handlers.SmallGroup.maintain
|
||||||
route "/announcement" Handlers.SmallGroup.announcement
|
route "/announcement" Handlers.SmallGroup.announcement
|
||||||
routef "/%O/edit" Handlers.SmallGroup.edit
|
routef "/%O/edit" Handlers.SmallGroup.edit
|
||||||
route "/log-on" (Handlers.SmallGroup.logOn None)
|
route "/log-on" (Handlers.SmallGroup.logOn None)
|
||||||
routef "/log-on/%O" (Some >> Handlers.SmallGroup.logOn)
|
routef "/log-on/%O" (Some >> Handlers.SmallGroup.logOn)
|
||||||
route "/logon" (redirectTo true "/small-group/log-on")
|
route "/logon" (redirectTo true "/web/small-group/log-on")
|
||||||
routef "/member/%O/edit" Handlers.SmallGroup.editMember
|
routef "/member/%O/edit" Handlers.SmallGroup.editMember
|
||||||
route "/members" Handlers.SmallGroup.members
|
route "/members" Handlers.SmallGroup.members
|
||||||
route "/preferences" Handlers.SmallGroup.preferences
|
route "/preferences" Handlers.SmallGroup.preferences
|
||||||
]
|
]
|
||||||
route "/web/unauthorized" Handlers.Home.unauthorized
|
route "/unauthorized" Handlers.Home.unauthorized
|
||||||
subRoute "/web/user" [
|
subRoute "/user" [
|
||||||
route "s" Handlers.User.maintain
|
route "s" Handlers.User.maintain
|
||||||
routef "/%O/edit" Handlers.User.edit
|
routef "/%O/edit" Handlers.User.edit
|
||||||
routef "/%O/small-groups" Handlers.User.smallGroups
|
routef "/%O/small-groups" Handlers.User.smallGroups
|
||||||
route "/log-on" Handlers.User.logOn
|
route "/log-on" Handlers.User.logOn
|
||||||
route "/logon" (redirectTo true "/user/log-on")
|
route "/logon" (redirectTo true "/web/user/log-on")
|
||||||
route "/password" Handlers.User.password
|
route "/password" Handlers.User.password
|
||||||
]
|
]
|
||||||
route "/web/" Handlers.Home.homePage
|
route "/" Handlers.Home.homePage
|
||||||
route "/" (redirectTo true "/web/")
|
|
||||||
]
|
]
|
||||||
POST [
|
POST [
|
||||||
subRoute "/web/church" [
|
subRoute "/church" [
|
||||||
routef "/%O/delete" Handlers.Church.delete
|
routef "/%O/delete" Handlers.Church.delete
|
||||||
route "/save" Handlers.Church.save
|
route "/save" Handlers.Church.save
|
||||||
]
|
]
|
||||||
subRoute "/web/prayer-request" [
|
subRoute "/prayer-request" [
|
||||||
routef "/%O/delete" Handlers.PrayerRequest.delete
|
routef "/%O/delete" Handlers.PrayerRequest.delete
|
||||||
route "/save" Handlers.PrayerRequest.save
|
route "/save" Handlers.PrayerRequest.save
|
||||||
]
|
]
|
||||||
subRoute "/web/small-group" [
|
subRoute "/small-group" [
|
||||||
route "/announcement/send" Handlers.SmallGroup.sendAnnouncement
|
route "/announcement/send" Handlers.SmallGroup.sendAnnouncement
|
||||||
routef "/%O/delete" Handlers.SmallGroup.delete
|
routef "/%O/delete" Handlers.SmallGroup.delete
|
||||||
route "/log-on/submit" Handlers.SmallGroup.logOnSubmit
|
route "/log-on/submit" Handlers.SmallGroup.logOnSubmit
|
||||||
@ -130,7 +131,7 @@ module Configure =
|
|||||||
route "/preferences/save" Handlers.SmallGroup.savePreferences
|
route "/preferences/save" Handlers.SmallGroup.savePreferences
|
||||||
route "/save" Handlers.SmallGroup.save
|
route "/save" Handlers.SmallGroup.save
|
||||||
]
|
]
|
||||||
subRoute "/web/user" [
|
subRoute "/user" [
|
||||||
routef "/%O/delete" Handlers.User.delete
|
routef "/%O/delete" Handlers.User.delete
|
||||||
route "/edit/save" Handlers.User.save
|
route "/edit/save" Handlers.User.save
|
||||||
route "/log-on" Handlers.User.doLogOn
|
route "/log-on" Handlers.User.doLogOn
|
||||||
@ -139,6 +140,9 @@ module Configure =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
// Temp redirect to new URLs
|
||||||
|
route "/" (redirectTo false "/web/")
|
||||||
|
]
|
||||||
|
|
||||||
let errorHandler (ex : exn) (logger : ILogger) =
|
let errorHandler (ex : exn) (logger : ILogger) =
|
||||||
logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
|
logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
|
||||||
|
Loading…
Reference in New Issue
Block a user