Update README.md with response

Fix logic error in `large_upload/complete/uuid`

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2025-08-01 21:34:28 +08:00
parent 2d7ce3f1c4
commit 0301a9d9f8
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
2 changed files with 87 additions and 27 deletions

View file

@ -207,7 +207,7 @@ router.post('/complete/:uuid', async (request, env, ctx) => {
}
const descriptor: PasteIndexEntry = JSON.parse(val);
if (descriptor.paste_type == PasteType.large_paste || !descriptor.upload_track?.pending_upload) {
if (descriptor.paste_type !== PasteType.large_paste || !descriptor.upload_track?.pending_upload) {
return new Response('Invalid operation.\n', {
status: 442,
});