File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ let package = Package(
1010 . executable( name: " App " , targets: [ " App " ] ) ,
1111 ] ,
1212 dependencies: [
13- . package ( url: " https://github.com/hummingbird-project/hummingbird.git " , from: " 2.0.0-rc.1 " ) ,
14- . package ( url: " https://github.com/hummingbird-community/hummingbird-elementary.git " , from: " 0.1 .0-rc.1 " ) ,
13+ . package ( url: " https://github.com/hummingbird-project/hummingbird.git " , from: " 2.0.0-rc.5 " ) ,
14+ . package ( url: " https://github.com/hummingbird-community/hummingbird-elementary.git " , from: " 0.2 .0-rc.1 " ) ,
1515 . package ( path: " ../../ " ) ,
1616 . package ( url: " https://github.com/apple/swift-async-algorithms " , from: " 1.0.0 " ) ,
1717 . package ( url: " https://github.com/swift-server/swift-service-lifecycle.git " , from: " 2.0.0 " ) ,
Original file line number Diff line number Diff line change @@ -11,14 +11,13 @@ func addRoutes(to router: Router<some RequestContext>) {
1111 }
1212 }
1313
14- router. get ( " /time " ) { _, context in
14+ router. get ( " /time " ) { _, _ in
1515 Response (
1616 status: . ok,
1717 headers: [ . contentType: " text/event-stream " ] ,
1818 body: . init { writer in
1919 while true {
20- try await writer. write ( context. allocator. buffer (
21- string: " data: \( TimeHeading ( ) . render ( ) ) \n \n " ) )
20+ try await writer. write ( ByteBuffer ( string: " data: \( TimeHeading ( ) . render ( ) ) \n \n " ) )
2221 try await Task . sleep ( for: . seconds( 1 ) )
2322 }
2423 }
You can’t perform that action at this time.
0 commit comments