WebService/test.js
azures04 3346dae465 Fix SQL syntax and add user registration test
Corrected a SQL syntax error in the databaseGlobals.js by removing an extraneous comma. Added a test script (test.js) to initialize the database and test user registration functionality.
2026-01-27 05:56:44 +01:00

19 lines
456 B
JavaScript

const globals = require("./modules/databaseGlobals")
const userService = require("./services/userService")
async function main() {
globals.initializeDatabase()
try {
const result = await userService.register({
firstName: "User",
lastName: "Root",
username: "admin",
password: "changme"
})
console.log(result)
} catch (error) {
console.error(error)
}
}
main()