diff --git a/server-api/src/main.rs b/server-api/src/main.rs index a081e54..e2fadd6 100644 --- a/server-api/src/main.rs +++ b/server-api/src/main.rs @@ -61,6 +61,7 @@ async fn route_dispatcher(pool: &Pool, resp: &mut Response, meth: &Method, /* MESSAGING */ (POST, routes::MESSAGE_SEND) => messages::send_message(pool, resp, params).await, (GET, routes::MESSAGE_TIME_RANGE) => messages::get_by_time(pool, resp, params).await, + (GET, routes::MESSAGE_FROM_ID) =>messages::from_id(pool, resp, params).await, /* ADMIN */ (POST, routes::SET_PERMS_BY_ADMIN) => admin::set_permissions(pool, resp, params).await, /* MEMBERS */ diff --git a/server-api/src/routes.rs b/server-api/src/routes.rs index 484f3e1..5c062e9 100644 --- a/server-api/src/routes.rs +++ b/server-api/src/routes.rs @@ -12,6 +12,7 @@ pub const CHANNELS_DELETE: Rstr = "/channels/delete"; // requires @name perms: pub const MESSAGE_SEND: Rstr = "/message/send"; // requires @content perms::MESSAGE_SEND pub const MESSAGE_TIME_RANGE: Rstr = "/message/get_range"; // requires @channel(id) @start-time @end-time +pub const MESSAGE_FROM_ID: Rstr = "/message/from_id"; // requires @channel(id) requires @start(id) @limit(1..1000) pub const GET_ONLINE_MEMBERS: Rstr = "/members/get_online";