Skip to content

Commit

Permalink
Fixed QueryBuilder type returned from User.attributes(on:) method
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkleveter committed Jun 19, 2018
1 parent fecbfa2 commit d57ae41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/App/Models/User/User+Attributes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Fluent

extension User {
/// Create a query that gets all the attributes belonging to a user.
func attributes(on connection: DatabaseConnectable)throws -> QueryBuilder<Attribute, Attribute> {
func attributes(on connection: DatabaseConnectable)throws -> QueryBuilder<Attribute.Database, Attribute> {
// Return an `Attribute` query that filters on the `userId` field.
return try Attribute.query(on: connection).filter(\.userID == self.id)
return try Attribute.query(on: connection).filter(\.userID == self.requireID())
}

/// Creates a dictionary where the key is the attribute's key and the value is the attribute's text.
Expand Down

0 comments on commit d57ae41

Please sign in to comment.