Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Apr 16, 2024
1 parent 2ee6870 commit 1f754ff
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions packages/core/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,7 @@ export class Router {
}
}

public get(
url: URL | string,
data: RequestPayload = {},
options: Omit<VisitOptions, 'method' | 'data'> = {},
): void {
public get(url: URL | string, data: RequestPayload = {}, options: Omit<VisitOptions, 'method' | 'data'> = {}): void {
return this.visit(url, { ...options, method: 'get', data })
}

Expand All @@ -519,19 +515,11 @@ export class Router {
return this.visit(url, { preserveState: true, ...options, replace: true })
}

public post(
url: URL | string,
data: RequestPayload = {},
options: Omit<VisitOptions, 'method' | 'data'> = {},
): void {
public post(url: URL | string, data: RequestPayload = {}, options: Omit<VisitOptions, 'method' | 'data'> = {}): void {
return this.visit(url, { preserveState: true, ...options, method: 'post', data })
}

public put(
url: URL | string,
data: RequestPayload = {},
options: Omit<VisitOptions, 'method' | 'data'> = {},
): void {
public put(url: URL | string, data: RequestPayload = {}, options: Omit<VisitOptions, 'method' | 'data'> = {}): void {
return this.visit(url, { preserveState: true, ...options, method: 'put', data })
}

Expand Down

0 comments on commit 1f754ff

Please sign in to comment.