article update automation #4

Merged
Hare merged 7 commits from develop into master 2024-09-03 05:14:12 +09:00
Showing only changes of commit bc0b59042e - Show all commits

View File

@ -0,0 +1,16 @@
import { json } from '@sveltejs/kit';
import { error } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
import {
TOKEN
} from '$env/static/private'
export const POST: RequestHandler = ({ url }) => {
const token = url.searchParams.get('token');
console.log(token);
if (token !== TOKEN) {
return error(401, 'Unauthorized');
}
return new Response(String(token));
};