chore: remove quark dependency from delta 🎉

closes #283

fix: allow setting port and use_tls from config
closes #143
This commit is contained in:
Paul Makles
2024-04-07 23:41:31 +01:00
parent 6bc74749d2
commit 20d398d02c
32 changed files with 734 additions and 77 deletions

View File

@@ -1,10 +1,9 @@
use revolt_quark::variables::delta::IS_STAGING;
use revolt_config::{config, Settings};
use revolt_rocket_okapi::{revolt_okapi::openapi3::OpenApi, settings::OpenApiSettings};
pub use rocket::http::Status;
pub use rocket::response::Redirect;
use rocket::{Build, Rocket};
mod admin;
mod bots;
mod channels;
mod customisation;
@@ -18,15 +17,14 @@ mod sync;
mod users;
mod webhooks;
pub fn mount(mut rocket: Rocket<Build>) -> Rocket<Build> {
pub fn mount(config: Settings, mut rocket: Rocket<Build>) -> Rocket<Build> {
let settings = OpenApiSettings::default();
if *IS_STAGING {
if config.features.webhooks_enabled {
mount_endpoints_and_merged_docs! {
rocket, "/".to_owned(), settings,
"/" => (vec![], custom_openapi_spec()),
"" => openapi_get_routes_spec![root::root],
"/admin" => admin::routes(),
"/users" => users::routes(),
"/bots" => bots::routes(),
"/channels" => channels::routes(),
@@ -47,7 +45,6 @@ pub fn mount(mut rocket: Rocket<Build>) -> Rocket<Build> {
rocket, "/".to_owned(), settings,
"/" => (vec![], custom_openapi_spec()),
"" => openapi_get_routes_spec![root::root],
"/admin" => admin::routes(),
"/users" => users::routes(),
"/bots" => bots::routes(),
"/channels" => channels::routes(),