Initial commit

This commit is contained in:
2026-01-25 20:05:53 +01:00
commit 29cf189a87
19 changed files with 3209 additions and 0 deletions

19
services/register.js Normal file
View File

@@ -0,0 +1,19 @@
const crypto = require("node:crypto")
const DefaultError = require("../errors/DefaultError")
function register({ email, username }) {
const canRegister = true
if (canRegister === true) {
return {
id: crypto.randomUUID(),
username: username,
email: email
}
} else {
throw new DefaultError(418, "I'm a teapot", "", "TeaPotExeception")
}
}
module.exports = {
register
}