English grammar

This commit is contained in:
Simon Edelmann 2020-02-29 00:47:25 +01:00
parent 2fac6bdb48
commit a4ab27741c
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ extension CrudControllerProtocol where ModelT: Replaceable {
internal func replace(_ id: ModelT.IDValue?, from data: ModelT.Replace, on database: Database) -> EventLoopFuture<ModelT> {
ModelT.find(id, on: database).unwrap(or: Abort(.notFound))
.flatMap { model in
model.replace(from: data)
model.replace(with: data)
return model.update(on: database).map { model }
}
}

View File

@ -2,5 +2,5 @@ import Vapor
public protocol Replaceable {
associatedtype Replace: Content
func replace(from data: Replace)
func replace(with data: Replace)
}

View File

@ -52,7 +52,7 @@ extension Todo: Replaceable {
var title: String
}
func replace(from data: Replace) {
func replace(with data: Replace) {
self.title = data.title
}
}