webuildsg / webuild

:memo: Robot-handpicked list of open events and open source for designers, developers and makers in Singapore
https://webuild.sg/
MIT License
62 stars 33 forks source link

add a button for admin to easily remove events or groups #242

Closed sayanee closed 8 years ago

sayanee commented 8 years ago

The data is laid out in a table at /admin:

New Groups

Group ID Group name Group URL Next event Action
12345 Hacker SG URL event, date [remove group]()
[add group]()

Upcoming 20 events

These events are coming from added / approved groups

Event ID Event name Event URL Action
12345 Hacker SG June with description URL [remove event]()
sayanee commented 8 years ago

follow branch https://github.com/webuildsg/webuild/tree/admin-page

notthetup commented 8 years ago

This should be behind http basic-auth on the /admin endpoint.

Steps for setting up basic-auth.

https://www.npmjs.com/package/basic-auth will come in handy.

sayanee commented 8 years ago

Currently on staging, without any save button. Just showing the list:

image

sayanee commented 8 years ago

@notthetup redirection is already there thanks to Cloudflare:

image

sayanee commented 8 years ago

Staging design refactoring:

image

sayanee commented 8 years ago

use fetch for post request

sayanee commented 8 years ago

use .push() synchronously in the forEach loop:

https://firebase.google.com/docs/database/server/save-data