-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/misc fixes #122
Feature/misc fixes #122
Conversation
siemensikkema
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some minor comments ..
| let config: AdminPanelConfig<U> = try req.make() | ||
| return U.query(on: req).all() | ||
| .flatMap(to: Response.self) { users in | ||
| let paginator: Future<OffsetPaginator<U>> = try U.query(on: req).paginate(for: req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still necessary to specify the explicit type here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid so since the return type is Response.
| internal func resetPasswordRequest(_ req: Request) throws -> Future<Response> { | ||
| let resetConfig: ResetConfig<U> = try req.make() | ||
| let adminPanelConfig: AdminPanelConfig<U> = try req.make() | ||
| let submission = try req.content.decode(U.RequestReset.Submission.self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guidelines ... ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I cannot do this here. The signature looks like this:
public func decode<D>(_ content: D.Type, maxSize: Int = 65_536) throws -> Future<D> where D: Decodableand there's no overload with a default value on content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh yeah that's a no-go then. Would be nice to detect all these occurrences in Vapor's code and fix them.
| import Flash | ||
| import Fluent | ||
| import Leaf | ||
| import Paginator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetized! 😍
Uh oh!
There was an error while loading. Please reload this page.