Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jun 23, 2023
1 parent e527933 commit 5d192be
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
32 changes: 13 additions & 19 deletions Sources/ParseServerSwift/Models/HookFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,10 @@ public extension RoutesBuilder {
Will log an error for each `parseServerURLString` that returns an error.
*/
@discardableResult
func post<Response>(
_ path: PathComponent...,
name: String,
use closure: @escaping (Request) async throws -> Response
) -> Route
where Response: AsyncResponseEncodable {
func post<Response>(_ path: PathComponent...,
name: String,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable {
self.on(path,
name: name,
use: closure)
Expand All @@ -311,12 +309,10 @@ public extension RoutesBuilder {
Will log an error for each `parseServerURLString` that returns an error.
*/
@discardableResult
func post<Response>(
_ path: [PathComponent],
name: String,
use closure: @escaping (Request) async throws -> Response
) -> Route
where Response: AsyncResponseEncodable {
func post<Response>(_ path: [PathComponent],
name: String,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable {

Check warning on line 315 in Sources/ParseServerSwift/Models/HookFunction.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseServerSwift/Models/HookFunction.swift#L315

Added line #L315 was not covered by tests
self.on(path,
name: name,
use: closure)
Expand All @@ -333,13 +329,11 @@ public extension RoutesBuilder {
Will log an error for each `parseServerURLString` that returns an error.
*/
@discardableResult
func on<Response>(
_ path: PathComponent...,
body: HTTPBodyStreamStrategy = .collect,
name: String,
use closure: @escaping (Request) async throws -> Response
) -> Route
where Response: AsyncResponseEncodable {
func on<Response>(_ path: PathComponent...,
body: HTTPBodyStreamStrategy = .collect,
name: String,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable {

Check warning on line 336 in Sources/ParseServerSwift/Models/HookFunction.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseServerSwift/Models/HookFunction.swift#L336

Added line #L336 was not covered by tests
self.on(path,
body: body,
name: name,
Expand Down
36 changes: 18 additions & 18 deletions Sources/ParseServerSwift/Models/HookTrigger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1083,12 +1083,12 @@ public extension RoutesBuilder {
className: String? = nil,
triggerName: ParseHookTriggerType,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable {
self.on(path,
body: body,
className: className,
trigger: triggerName,
use: closure)
where Response: AsyncResponseEncodable {
self.on(path,
body: body,
className: className,
trigger: triggerName,
use: closure)

Check warning on line 1091 in Sources/ParseServerSwift/Models/HookTrigger.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseServerSwift/Models/HookTrigger.swift#L1086-L1091

Added lines #L1086 - L1091 were not covered by tests
}

/**
Expand All @@ -1110,12 +1110,12 @@ public extension RoutesBuilder {
className: String? = nil,
trigger: ParseHookTriggerType,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable {
self.on(path,
body: body,
className: className,
trigger: trigger,
use: closure)
where Response: AsyncResponseEncodable {
self.on(path,
body: body,
className: className,
trigger: trigger,
use: closure)
}

/**
Expand All @@ -1137,12 +1137,12 @@ public extension RoutesBuilder {
object: V.Type,
trigger: ParseHookTriggerType,
use closure: @escaping (Request) async throws -> Response) -> Route
where Response: AsyncResponseEncodable, V: ParseObject {
self.on(path,
body: body,
className: object.className,
trigger: trigger,
use: closure)
where Response: AsyncResponseEncodable, V: ParseObject {
self.on(path,
body: body,
className: object.className,
trigger: trigger,
use: closure)
}

/**
Expand Down

0 comments on commit 5d192be

Please sign in to comment.