summaryrefslogtreecommitdiffstats
path: root/server/src/routes/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/api.rs')
-rw-r--r--server/src/routes/api.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/src/routes/api.rs b/server/src/routes/api.rs
index 1565afb8..ec9f61e8 100644
--- a/server/src/routes/api.rs
+++ b/server/src/routes/api.rs
@@ -83,6 +83,14 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) {
.route("/like", web::post().to(route_post::<CreateCommentLike>))
.route("/save", web::put().to(route_post::<SaveComment>)),
)
+ // Private Message
+ .service(
+ web::scope("/private_message")
+ .wrap(rate_limit.message())
+ .route("/list", web::get().to(route_get::<GetPrivateMessages>))
+ .route("", web::post().to(route_post::<CreatePrivateMessage>))
+ .route("", web::put().to(route_post::<EditPrivateMessage>)),
+ )
// User
.service(
// Account action, I don't like that it's in /user maybe /accounts