G
G
griboedov-pro2017-08-23 14:14:49
Data types
griboedov-pro, 2017-08-23 14:14:49

Vapor Swift - how to give an object, one of the elements of which is an array?

How to return an object, one of whose elements is an array of strings?
Moled:
extension User: Preparation {
static func prepare(_ database: Database) throws {
try database.create(self) { builder in
builder.id()
builder.name(User.nameKey)
builder.bytes(User.textKey) - gives base64
builder.srting(User.textKey) - gives a string
}
}
static func revert(_ database: Database) throws {
try database.delete(self)
}
}
Transferring data and then encoding it at the front is kind of a crooked idea, but how to transfer an object, one of whose elements is an array of strings... I'm stupid... Maybe someone will tell you...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question