Remove echo
This commit is contained in:
parent
20f37abbfd
commit
1012967129
3 changed files with 0 additions and 32 deletions
23
README.md
23
README.md
|
|
@ -54,26 +54,3 @@ init script. If not, edit the api-test/init.sh file and set correct api-key (non
|
|||
sh api-test/init.sh
|
||||
```
|
||||
|
||||
## The rest of this readme is currently outdated and will be updated shortly
|
||||
|
||||
QUIZTerm is a simple online "quiz answering" game. It provides a way for contestants to provide answers to questions,
|
||||
and reveal the answers for everyone at the same time.
|
||||
|
||||
Cards showing who are playing, their answer status (have they answered or not?), and when revealed, what their answer
|
||||
was, will show up on everyones screen.
|
||||
|
||||
Not quite finished yet, it is at a point where it is "usable" enough.
|
||||
|
||||
Endpoints explained
|
||||
|
||||
| Endpoint | Usage |
|
||||
|--------------------------|--------------------------------------------------------------|
|
||||
| /room/<room_id> | Create room with given room_id (max 200 rooms) |
|
||||
| /board/<room_id> | Join a game with the given room_id |
|
||||
| /board/<room_id>/control | Join a game with the given room_id with more control options |
|
||||
|
||||
|
||||
| Ingame example | Idle player |
|
||||
|--------------------------|--------------------------|
|
||||
|  |  |
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ fn serve_static(filename: String) {
|
|||
let data =
|
||||
mist.send_file(path, offset: 0, limit: None)
|
||||
|> result.map(fn(file) {
|
||||
echo "SUCCESS " <> filename
|
||||
response.new(200)
|
||||
|> response.set_header("Content-Type", case surname {
|
||||
Ok("css") -> "text/css"
|
||||
|
|
@ -93,13 +92,11 @@ fn serve_static(filename: String) {
|
|||
|> response.set_body(file)
|
||||
})
|
||||
|> result.lazy_unwrap(fn() {
|
||||
echo "FAIL " <> filename
|
||||
response.new(404)
|
||||
|> response.set_body(
|
||||
bytes_tree.from_string("Requested resource not found") |> mist.Bytes,
|
||||
)
|
||||
})
|
||||
echo "Attempting to serve file " <> filename <> " was "
|
||||
|
||||
data
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@ fn handle_api(
|
|||
|
||||
case list.key_find(req.headers, "x-api-key") {
|
||||
Ok(key) -> {
|
||||
echo "key" <> key
|
||||
echo "enc key "
|
||||
<> string.lowercase(
|
||||
bit_array.base16_encode(crypto.hash(crypto.Sha256, <<key:utf8>>)),
|
||||
)
|
||||
echo "sha" <> sha_api_key
|
||||
case
|
||||
string.lowercase(
|
||||
bit_array.base16_encode(crypto.hash(crypto.Sha256, <<key:utf8>>)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue