Skip to content

Commit

Permalink
feat(wip): edit paste
Browse files Browse the repository at this point in the history
  • Loading branch information
xiadd committed Sep 7, 2024
1 parent 953d1b6 commit 64d3d66
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@cloudflare/workers-types": "^4.20240502.0",
"hono": "^4.1.3",
"hono": "^4.5.11",
"nanoid": "^4.0.0"
}
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ app.post('/api/create', async (c) => {
expire: expire || 0,
language: language || 'text',
create_time: createTime,
edit_password: share_password || nanoid(8),
metadata: {
language: language || 'text',
create_time: createTime,
Expand Down
1 change: 1 addition & 0 deletions src/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ DROP TABLE IF EXISTS files;
CREATE TABLE IF NOT EXISTS pastes (
id text PRIMARY KEY,
content text NOT NULL,
edit_password text DEFAULT "",
expire integer DEFAULT 0 NOT NULL,
language text DEFAULT "text" NOT NULL,
create_time integer NOT NULL,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ hasown@^2.0.0:
dependencies:
function-bind "^1.1.2"

hono@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/hono/-/hono-4.1.3.tgz#8fd8cb2fe52da139755891600ffc8fabf4079ca0"
integrity sha512-V0I6qCw0gn2MA4LLtyXe6oD3/7ToeQf5Zv98o7uSuLuViQgWHJeYoYrZ4NbXhOtg4SaZjNJJm1+XuFB3LN+j6A==
hono@^4.5.11:
version "4.5.11"
resolved "https://registry.yarnpkg.com/hono/-/hono-4.5.11.tgz#452743c4b372078001506e3ce315e878f030e369"
integrity sha512-62FcjLPtjAFwISVBUshryl+vbHOjg8rE4uIK/dxyR8GpLztunZpwFmfEvmJCUI7xoGh/Sr3CGCDPCmYxVw7wUQ==

is-binary-path@~2.1.0:
version "2.1.0"
Expand Down

0 comments on commit 64d3d66

Please sign in to comment.