sderacy / gooncard

The Goon Squad's Goon Card Project for CSC 355 ('22)
http://gooncard.hpc.tcnj.edu:3000/
MIT License
6 stars 2 forks source link

Add qrcode endpoint #123

Closed paytonshaltis closed 2 years ago

paytonshaltis commented 2 years ago

Closes #1, closes #40.

This PR uses the new card_entries table to add entries anytime the user clicks 'generate' on the home screen. The backend API is called, a unique UUID for that card is generated and stored in the database, and the UUID is returned to the client. The QR code can then be generated with this ID, and the user can navigate to the card page. Currently, the accounts are not showing up on the page, but this is a task for issue #113.

When generating a QR code, an alert pops up with the URL (also logged to the console) which is useful now for testing since not everyone's phone is working with the application. You can just copy and paste this into your browser on your computer to test the link.

I definitely recommend testing this one out on your own computers.

sderacy commented 2 years ago

@paytonshaltis You have a merge conflict here. Take another look at your toggle code now that Leah's code has been merged in.

I'd do it myself but I wanna make sure I don't ruin any functionality you have.

Once that's done, I take a closer look at it.

paytonshaltis commented 2 years ago

@paytonshaltis You have a merge conflict here. Take another look at your toggle code now that Leah's code has been merged in.

Yeah, Leah's changes weren't in main by the time I made this PR... conflicts were simple enough to fix, feel free to test now and let me know if something isn't working how you'd expect it.

sderacy commented 2 years ago

The generate button is disabled: image

I made sure to remove the node_modules folder and installing the packages so do you know what this might be caused by?

sderacy commented 2 years ago

Update: It seems to happen only when you press the "All" button at the top.

sderacy commented 2 years ago

Also I can't test the QR code path on my laptop since I can't run it on my phone, but I can see that it's generating the uuid.

sderacy commented 2 years ago

@matyis1 @lelekaz @thadakn1 If you've encountered the issue where your phone is not able to access the server on your computer, I would double check your firewall settings.

I got mine to work by turning off my firewall, which means something specifically is denying my phone access.

It makes sense why I could connect to Payton's laptop and not my own.

Just a heads up.