Merge remote-tracking branch 'origin/main' into user-management

This commit is contained in:
Tzvetan Trave
2025-10-17 14:40:00 +02:00
7 changed files with 117 additions and 22 deletions

View File

@ -0,0 +1,19 @@
import axios from 'axios'
/**
* @param {string} username
* @param {import('fastify').FastifyInstance} fastify
*/
export async function authUserRemove(username, fastify) {
const url = (process.env.USER_URL || "http://localhost:3002") + "/users/" + username;
const cookie = fastify.jwt.sign({ user: "admin" });
await axios.post(
url,
{
headers: {
'Cookie': 'token=' + cookie,
},
}
);
}