Implemented the bare bone version for the ArchiveController controller in the library target.
This commit is contained in:
parent
b190a8b02d
commit
ac99447836
26
Library/Sources/Internal/Controllers/ArchiveController.swift
Normal file
26
Library/Sources/Internal/Controllers/ArchiveController.swift
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import Hummingbird
|
||||||
|
|
||||||
|
struct ArchiveController<Context: RequestContext> {
|
||||||
|
|
||||||
|
// MARK: Functions
|
||||||
|
|
||||||
|
func register(to router: Router<Context>) {
|
||||||
|
router.get("archives", use: listAllArchives)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Helpers
|
||||||
|
|
||||||
|
private extension ArchiveController {
|
||||||
|
|
||||||
|
// MARK: Functions
|
||||||
|
|
||||||
|
@Sendable func listAllArchives(
|
||||||
|
_ request: Request,
|
||||||
|
context: Context
|
||||||
|
) async throws -> HTTPResponse.Status {
|
||||||
|
.ok
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user