mirror of
				https://github.com/Dan6erbond/sk-auth.git
				synced 2025-10-26 10:22:56 +01:00 
			
		
		
		
	fix: rename endpoint method to uppercase (#100)
* fix: rename endpoint method to uppercase * fix: prettier and lint
This commit is contained in:
		
							parent
							
								
									ca3cca1d6f
								
							
						
					
					
						commit
						fab4b8698d
					
				| @ -4,7 +4,6 @@ import { appAuth } from "$lib/appAuth"; | ||||
| export const handle: Handle = async ({ event, resolve }) => { | ||||
|   // TODO https://github.com/sveltejs/kit/issues/1046
 | ||||
| 
 | ||||
| 
 | ||||
|   if (event.request.query.has("_method")) { | ||||
|     event.request.method = event.request.query.get("_method").toUpperCase(); | ||||
|   } | ||||
|  | ||||
| @ -245,12 +245,7 @@ | ||||
|   </div> | ||||
| 
 | ||||
|   <p class={clsx("text-lg", "mb-2")}>Session</p> | ||||
|   <pre | ||||
|     class={clsx( | ||||
|       "bg-gray-100", | ||||
|       "whitespace-pre-wrap", | ||||
|       "p-3", | ||||
|     )}> | ||||
|   <pre class={clsx("bg-gray-100", "whitespace-pre-wrap", "p-3")}> | ||||
|     <code>{JSON.stringify($session, null, 2)}</code> | ||||
|   </pre> | ||||
| </div> | ||||
|  | ||||
| @ -188,7 +188,7 @@ export class Auth { | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   get: RequestHandler = async (event: RequestEvent): Promise<any> => { | ||||
|   GET: RequestHandler = async (event: RequestEvent): Promise<any> => { | ||||
|     const { url } = event; | ||||
| 
 | ||||
|     if (url.pathname === this.getPath("csrf")) { | ||||
| @ -205,7 +205,7 @@ export class Auth { | ||||
|     return await this.handleEndpoint(event); | ||||
|   }; | ||||
| 
 | ||||
|   post: RequestHandler = async (event: RequestEvent) => { | ||||
|   POST: RequestHandler = async (event: RequestEvent) => { | ||||
|     return await this.handleEndpoint(event); | ||||
|   }; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user