1
0
mirror of https://git.cant.at/Madeorsk/PollVerlaine synced 2024-11-21 20:24:31 +01:00

Betterize the README, Set the Good email and some format

This commit is contained in:
Tagadda 2018-08-13 13:02:09 +02:00
parent 9c4add0217
commit a031045f66
4 changed files with 28 additions and 2 deletions

View File

@ -1,2 +1,27 @@
# PollVerlaine
A small alternative to Straw Poll.
## Installation
Clone the repository :
```sh
mkdir db && touch db/polls.db && composer install
```
Uncomment the dba extention in `php.ini` :
```
extension=dba
```
Rename `config/app.example.php` to `config/app.php`.
Sample configuration for nginx :
```nginx
location /
{
try_files $uri /index.php =404;
}
```
## API

View File

@ -12,7 +12,7 @@
},
{
"name": "Tagada",
"email": "madeorsk@protonmail.com"
"email": "tagada@cant.at"
}
]
}

View File

@ -27,6 +27,7 @@ Flight::route("POST /polls", function () {
else
Flight::halt(403, "<h1>403 Forbidden</h1><h3>Invalid Content-Type.</h3>");
});
Flight::route("GET /polls/@id:[a-fA-F0-9]+", function ($id) {
$poll = Poll::load_poll($id);
if ($poll)

View File

@ -91,4 +91,4 @@ class Poll
]), $db);
dba_close($db);
}
}
}