HackFSU / hackfsu-2018

HackFSU Website & Api
https://hackfsu.com
5 stars 14 forks source link

Create routes for ScanEvents #70

Closed andrewsosa closed 6 years ago

andrewsosa commented 6 years ago

Needs to also make sure you can't scan or check in people who are not approved for hackathon.

andrewsosa commented 6 years ago

So three routes here:

  1. GET to get a list of possible events

/api/events

{
    "events": [
        {
            "id": 1,
             "name": "Check In"
        },
        {
            "id": 2,
            "name": "Breakfast"
        },
        ...
    ]
}
  1. POST to upload the event ID and hex code.

/api/events/scan

{
     "event": 1,
     "hacker": "efefef"
}

This will send back a few status codes:

  1. GET for a hacker to see what they've scanned in on

/api/user/get/events

{
    "events": [
        {
        "time": "2018-02-04T20:24:52.365121+00:00",
                "name": "Check In"
        },
    {
        "time": "2018-02-04T20:24:52.365121+00:00",
        "name": "Breakfast"
    }
    ]
}
andrewsosa commented 6 years ago

for the POST /api/events/scan, we should return a Status, Message, and name of the person scanned if successful.

andrewsosa commented 6 years ago

All of these features are done as of 7ff08578b2207d888b60c9ed49e5f1a2baa2a6dc, see related commits on Feb 4 2018.

andrewsosa commented 6 years ago

@AndibaOfficial @CFarzaneh @Randy424 note I closed this issue, but you may still need it for reference.