1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! REST API route definitions (PostgREST-compatible)
//!
//! Maps the `/rest/v1/` URL namespace to the appropriate handler functions.
use ;
use crate;
/// Create PostgREST-compatible REST routes.
///
/// These are designed to be nested at `/rest/v1` in the top-level router.
///
/// # Endpoints
///
/// | Method | Path | Description |
/// |--------|-----------------|----------------------------|
/// | GET | `/:table` | Select rows from table |
/// | POST | `/:table` | Insert rows into table |
/// | PATCH | `/:table` | Update rows in table |
/// | DELETE | `/:table` | Delete rows from table |
/// | POST | `/rpc/:function`| Execute stored function |