This commit is contained in:
Quint Ulchar 2023-11-14 10:18:04 -05:00
parent 28750113c6
commit a7471fb647
19 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
.env .env
node_modules/ node_modules/
uploads/

View File

@ -8,7 +8,9 @@ const passport = require('passport');
router.post('/register', async (req, res) => { router.post('/register', async (req, res) => {
const { username, password } = req.body; const { username, password } = req.body;
if (!username || !password) return res.status(400).json({ error: 'Missing fields' }); if (!username || !password) return res.status(400).json({ error: 'Missing fields' });
const user = new User({ username, password }); const pfp = "https://source.boringavatars.com/marble/" + username
console.log(pfp)
const user = new User({ username, password, profilePhoto: pfp });
await user.save(); await user.save();
res.sendStatus(201); res.sendStatus(201);
console.log("register success") console.log("register success")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB