import { api } from './_api' ; import type { RequestHandler } from '@sveltejs/kit' ; import type { Locals } from '$lib/types' ; export const patch = async ( request ) => { return api ( request , `todos/${ request . locals . userid }/${ request . params . uid }` , { text : request . body . get ( 'text' ) , done : request . body . has ( 'done' ) ? ! ! request . body . get ( 'done' ) : undefined } ) ; } ; export const del = async ( request ) => { return api ( request , `todos/${ request . locals . userid }/${ request . params . uid }` ) ; } ;