Skip to content

Commit

Permalink
Make the linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Dec 14, 2024
1 parent fa1e5d6 commit 8b0adf4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/Orders/OrdersService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import FluentKit
import Vapor

/// The main class that handles Wallet orders.
public final class OrdersService<OD: OrderDataModel>: Sendable where Order == OD.OrderType{
public final class OrdersService<OD: OrderDataModel>: Sendable where Order == OD.OrderType {
private let service: OrdersServiceCustom<OD, Order, OrdersDevice, OrdersRegistration, OrdersErrorLog>

/// Initializes the service and registers all the routes required for Apple Wallet to work.
Expand Down
7 changes: 4 additions & 3 deletions Sources/Orders/OrdersServiceCustom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ extension OrdersServiceCustom {
throw Abort(.notModified)
}

guard let orderData = try await OD.query(on: req.db)
.filter(\._$order.$id == id)
.first()
guard
let orderData = try await OD.query(on: req.db)
.filter(\._$order.$id == id)
.first()
else {
throw Abort(.notFound)
}
Expand Down
7 changes: 4 additions & 3 deletions Sources/Passes/PassesServiceCustom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ extension PassesServiceCustom {
throw Abort(.notModified)
}

guard let passData = try await PD.query(on: req.db)
.filter(\._$pass.$id == id)
.first()
guard
let passData = try await PD.query(on: req.db)
.filter(\._$pass.$id == id)
.first()
else {
throw Abort(.notFound)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/PassesTests/PassesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct PassesTests {
let pass = try await passData.$pass.get(on: app.db)

let data = try await passesService.build(pass: passData, on: app.db)

let passURL = FileManager.default.temporaryDirectory.appendingPathComponent("\(UUID().uuidString).pkpass")
try data.write(to: passURL)
let passFolder = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString, isDirectory: true)
Expand Down

0 comments on commit 8b0adf4

Please sign in to comment.