temporary sketch patch for the following routse

*SET_PERMS_BY_ADMIN
*NEW_ADMIN
NOTE: this patch blows since its coming right before another large redesign
that redesign is the integration of a proper databse interface
This commit is contained in:
shockrah
2020-08-29 21:02:57 -07:00
parent d40eb24072
commit eae2677765
4 changed files with 88 additions and 15 deletions

View File

@@ -57,6 +57,10 @@ async fn route_dispatcher(pool: &Pool, resp: &mut Response<Body>, meth: &Method,
(POST, routes::CHANNELS_DELETE) => channels::delete_channel(pool, resp, params).await,
/* MESSAGING */
(POST, routes::MESSAGE_SEND) => messages::send_message(pool, resp, params).await,
/* ADMIN */
(POST, routes::SET_PERMS_BY_ADMIN) => admin::set_permissions(pool, resp, params).await,
/* OWNER */
(POST, routes::SET_NEW_ADMIN) => admin::new_admin(pool, resp, params).await,
_ => {
// We attempt dynamic routes as fallback for a few reasons
// 1. theres less of these than there are the static routes