Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(m/direct)!: make links case-insensitive #149

merged opened by a.starrysky.fyi targeting main from private/minion/push-prroxtvotrzn

It's not good if our links are case sensitive as different capitalizations aren't that distinct really. It's still important to make sure we don't mess up capitalization in the UI or when forwarding to search engines/etc., though

BREAKING-CHANGE: If you're using links that were made with capitals, those links will stop working

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3mbmzcz4krf22
+2 -2
Diff #0
+2 -2
menu/src/main.rs
··· 50 50 } 51 51 52 52 async fn get_redirect(default_location: &str, go: &str) -> Redirect { 53 - let redirect = sqlx::query!(r#"SELECT ("to") FROM direct WHERE "from" = $1 LIMIT 1"#, go) 53 + let redirect = sqlx::query!(r#"SELECT ("to") FROM direct WHERE "from" = $1 LIMIT 1"#, go.to_lowercase()) 54 54 .fetch_one( 55 55 STATE 56 56 .get() ··· 134 134 135 135 let create_call = sqlx::query!( 136 136 r#"INSERT INTO direct ("from", "to", "owner") VALUES ($1, $2, $3)"#, 137 - create.from, 137 + create.from.to_lowercase(), 138 138 create.to, 139 139 owner, 140 140 )

History

1 round 0 comments
sign up or login to add to the discussion
a.starrysky.fyi submitted #0
1 commit
expand
feat(m/direct)!: make links case-insensitive
5/5 success
expand
expand 0 comments
pull request successfully merged