mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Add external uuid to user create.
This commit is contained in:
parent
d2100c33b7
commit
df84a16b95
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ export default async (req, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
const { username, password } = req.body;
|
const { username, password, id } = req.body;
|
||||||
|
|
||||||
const user = await getUser({ username });
|
const user = await getUser({ username });
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default async (req, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const created = await createUser({
|
const created = await createUser({
|
||||||
id: uuid(),
|
id: id || uuid(),
|
||||||
username,
|
username,
|
||||||
password: hashPassword(password),
|
password: hashPassword(password),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue