Author: Not specified Language: javascript
Description: (v17) Timestamp: 2018-06-12 12:33:27 +0000
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply
  1.  
  2.     return database
  3.                 .getAllUsers()
  4.                 .flatMap(to: HTTPStatus.self) { users in
  5.         let user = users[0]
  6.         use.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