Skip to content
Permalink
71381e937b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
11 lines (9 sloc) 347 Bytes
import { jsonResponse } from "../../common.js";
export async function onRequestGet(context: RequestContext) {
const { results } = await context.env.D1.prepare(
"SELECT created_at, destination, path FROM short_links WHERE user = ?;",
)
.bind(context.data.current_user.id)
.all();
return jsonResponse(JSON.stringify(results));
}