mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-25 01:10:32 +00:00
Make import and export settings endpoints reachable (#4143)
* Make import and export settings endpoints reachable * Preserve original routes
This commit is contained in:
parent
e00b0c9da2
commit
1dc6c60760
2 changed files with 11 additions and 7 deletions
|
@ -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())
|
.wrap(rate_limit.post())
|
||||||
.route(web::get().to(get_captcha)),
|
.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
|
// User actions
|
||||||
.service(
|
.service(
|
||||||
web::scope("/user")
|
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("/list_logins", web::get().to(list_logins))
|
||||||
.route("/validate_auth", web::get().to(validate_auth)),
|
.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
|
// Admin Actions
|
||||||
.service(
|
.service(
|
||||||
web::scope("/admin")
|
web::scope("/admin")
|
||||||
|
|
Loading…
Reference in a new issue