mirror of
https://github.com/ilyakooo0/WebSocketTest.git
synced 2024-11-28 04:52:08 +03:00
Fixed linux. Added /posts
This commit is contained in:
parent
b113ab03f7
commit
b6b2e10091
@ -33,6 +33,10 @@ public func routes(_ router: Router) throws {
|
||||
}
|
||||
return post
|
||||
}
|
||||
|
||||
router.get("posts") { (req) -> [Post] in
|
||||
return Array(Post.storage.values)
|
||||
}
|
||||
}
|
||||
|
||||
enum DatabaseError: Error, AbortError {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import App
|
||||
|
||||
#if os(Linux)
|
||||
import SwiftGlibc
|
||||
srandom(UInt32(time(nil)))
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user