aboutsummaryrefslogtreecommitdiff
path: root/src/api/mod.rs
blob: 17ffea4ba49eada0ab3bda65150fbbd3086232f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

mod routes;

pub struct Api;
impl Api {
  pub fn listen() {
    let _ = rocket::ignite()
      .mount("/", routes![routes::index])
      .mount("/api/v1", routes![routes::stats::statistics])
      .launch();
  }
}