Files
k3s/3Dbelte/src/routes/api/login/+server.js
2025-02-14 11:49:17 +01:00

14 lines
224 B
JavaScript

import { json } from '@sveltejs/kit';
import jwt from 'jsonwebtoken';
export async function POST() {
const token = await jwt.sign(
{
id: 'sample-id',
secret: 'secret'
},
'shhhhh'
);
return json({ token });
}