mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-02 01:01:20 +00:00
update
This commit is contained in:
parent
8ac9e2b2d4
commit
026d58387c
3 changed files with 4 additions and 11 deletions
|
@ -28,7 +28,7 @@
|
||||||
"eslint": "^9.14.0",
|
"eslint": "^9.14.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
"lemmy-js-client": "0.20.0-api-v4.6",
|
"lemmy-js-client": "0.20.0-api-v4.7",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"ts-jest": "^29.1.0",
|
"ts-jest": "^29.1.0",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
|
|
|
@ -119,8 +119,7 @@ test("Requests with invalid auth should be treated as unauthenticated", async ()
|
||||||
headers: { Authorization: "Bearer foobar" },
|
headers: { Authorization: "Bearer foobar" },
|
||||||
fetchFunction,
|
fetchFunction,
|
||||||
});
|
});
|
||||||
let my_user = await getMyUser(invalid_auth);
|
await expect(getMyUser(invalid_auth)).rejects.toStrictEqual(Error("incorrect_login"));
|
||||||
expect(my_user).toBeUndefined();
|
|
||||||
let site = await getSite(invalid_auth);
|
let site = await getSite(invalid_auth);
|
||||||
expect(site.site_view).toBeDefined();
|
expect(site.site_view).toBeDefined();
|
||||||
|
|
||||||
|
|
|
@ -210,10 +210,7 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
|
||||||
.route("/approve", post().to(post_pending_follows_approve)),
|
.route("/approve", post().to(post_pending_follows_approve)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.route(
|
.route("/federated_instances", get().to(get_federated_instances))
|
||||||
"/federated_instances",
|
|
||||||
get().to(get_federated_instances),
|
|
||||||
)
|
|
||||||
// Post
|
// Post
|
||||||
.service(
|
.service(
|
||||||
// Handle POST to /post separately to add the post() rate limitter
|
// Handle POST to /post separately to add the post() rate limitter
|
||||||
|
@ -288,10 +285,7 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
|
||||||
.route("/logout", post().to(logout))
|
.route("/logout", post().to(logout))
|
||||||
.route("/password_reset", post().to(reset_password))
|
.route("/password_reset", post().to(reset_password))
|
||||||
.route("/get_captcha", get().to(get_captcha))
|
.route("/get_captcha", get().to(get_captcha))
|
||||||
.route(
|
.route("/password_change", post().to(change_password_after_reset))
|
||||||
"/password_change",
|
|
||||||
post().to(change_password_after_reset),
|
|
||||||
)
|
|
||||||
.route("/change_password", put().to(change_password))
|
.route("/change_password", put().to(change_password))
|
||||||
.route("/totp/generate", post().to(generate_totp_secret))
|
.route("/totp/generate", post().to(generate_totp_secret))
|
||||||
.route("/totp/update", post().to(update_totp))
|
.route("/totp/update", post().to(update_totp))
|
||||||
|
|
Loading…
Reference in a new issue