Author: Not specified Language: javascript
Description: (v18) Timestamp: 2018-06-12 12:35:14 +0000
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply
  1. return database
  2.     .getAllUsers()
  3.     .flatMap(to: HTTPStatus.self) { users in
  4.  
  5.     let user = users[0]
  6.     user.name = "Bob"
  7.        
  8.     return user.save().map(to: HTTPStatus.self) { user in
  9.         return HTTPStatus.noContent
  10.     }
  11. }
  12.  
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply