diff options
author | Shav Kinderlehrer <[email protected]> | 2023-10-16 14:08:23 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-10-16 14:08:23 -0400 |
commit | c5d3db7993b5ca39b48d055a5b42a57113757839 (patch) | |
tree | fa0a8fdff5dc2e96779623711c61c6d24ecc1d6d /src/post.ts | |
parent | 612e67d3dca483fa03b5f0e9d5778a0a693a7474 (diff) | |
download | url-shortener-c5d3db7993b5ca39b48d055a5b42a57113757839.tar.gz url-shortener-c5d3db7993b5ca39b48d055a5b42a57113757839.zip |
Diffstat (limited to 'src/post.ts')
-rw-r--r-- | src/post.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/post.ts b/src/post.ts index 538ff00..94643d4 100644 --- a/src/post.ts +++ b/src/post.ts @@ -20,7 +20,7 @@ export async function post_c(body: any, sql: Sql) { custom_id = false; const hasher = new Bun.CryptoHasher("md5"); hasher.update(form.url.href); - form.id = hasher.digest("hex").slice(0, 11); + form.id = hasher.digest("hex").slice(0, 4); } const valid_re = /^[A-z0-9_-]+$/; |