Skip to content

Commit

Permalink
Merge branch 'feature/new'
Browse files Browse the repository at this point in the history
  • Loading branch information
wmcginty committed Mar 22, 2023
2 parents e1c38c4 + 3552c26 commit 9260f45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extension User {
.field("email", .string, .required)
.unique(on: "email")
.field("password", .string, .required)
.field("social_id", .string)
.create()
}

Expand Down Expand Up @@ -85,7 +86,7 @@ extension User {
}

static func uniqueness(forEmail email: String, on request: Request) async throws -> Bool {
return try await User.isExisting(matching: \.$email == email, on: request.db)
return try await !User.isExisting(matching: \.$email == email, on: request.db)
}

static func ensureUniqueness(for registrant: User, on request: Request) async throws {
Expand Down
2 changes: 1 addition & 1 deletion Backend/Tests/BackendAppTests/AppTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App
import BackendApp
import Dispatch
import XCTest

Expand Down

0 comments on commit 9260f45

Please sign in to comment.