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

This commit is contained in:
Tzvetan Trave committed 2025-10-17 14:40:00 +02:00
commit a265583d4d
7 files changed
+117 -22

No files matched your search

+19
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,
},
}
);
}