mirror of https://github.com/LemmyNet/lemmy.git
Make import and export settings endpoints reachable (#4143)
* Make import and export settings endpoints reachable * Preserve original routespull/4151/head
parent
e00b0c9da2
commit
1dc6c60760
|
@ -1 +1 @@
|
|||
Subproject commit 83540721c6035c701f4ef1daf7d95f78a51fedf7
|
||||
Subproject commit 8bb90fa4a30e6dc2ba4449794e99d6b3325bebb5
|
|
@ -260,6 +260,16 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
|
|||
.wrap(rate_limit.post())
|
||||
.route(web::get().to(get_captcha)),
|
||||
)
|
||||
.service(
|
||||
web::resource("/user/export_settings")
|
||||
.wrap(rate_limit.import_user_settings())
|
||||
.route(web::get().to(export_settings)),
|
||||
)
|
||||
.service(
|
||||
web::resource("/user/import_settings")
|
||||
.wrap(rate_limit.import_user_settings())
|
||||
.route(web::post().to(import_settings)),
|
||||
)
|
||||
// User actions
|
||||
.service(
|
||||
web::scope("/user")
|
||||
|
@ -300,12 +310,6 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
|
|||
.route("/list_logins", web::get().to(list_logins))
|
||||
.route("/validate_auth", web::get().to(validate_auth)),
|
||||
)
|
||||
.service(
|
||||
web::scope("/user")
|
||||
.wrap(rate_limit.import_user_settings())
|
||||
.route("/export_settings", web::get().to(export_settings))
|
||||
.route("/import_settings", web::post().to(import_settings)),
|
||||
)
|
||||
// Admin Actions
|
||||
.service(
|
||||
web::scope("/admin")
|
||||
|
|
Loading…
Reference in New Issue