feat: Adds reset password api route, needs associated view route.
This commit is contained in:
@@ -121,6 +121,7 @@ public extension SiteRoute {
|
||||
case create(User.Create)
|
||||
case get(id: User.ID)
|
||||
case index
|
||||
case resetPassword(id: User.ID, request: User.ResetPassword)
|
||||
case update(id: User.ID, updates: User.Update)
|
||||
|
||||
static let rootPath = "users"
|
||||
@@ -143,6 +144,11 @@ public extension SiteRoute {
|
||||
Path { rootPath }
|
||||
Method.get
|
||||
}
|
||||
Route(.case(Self.resetPassword(id:request:))) {
|
||||
Path { rootPath; User.ID.parser(); "reset-password" }
|
||||
Method.patch
|
||||
Body(.json(User.ResetPassword.self))
|
||||
}
|
||||
Route(.case(Self.update(id:updates:))) {
|
||||
Path { rootPath; User.ID.parser() }
|
||||
Method.patch
|
||||
|
||||
Reference in New Issue
Block a user