Add uploader check.

create_local_image_view
Dessalines 2024-04-16 09:10:27 -04:00
parent ac1a827e5e
commit 7f5e9c036a
3 changed files with 10 additions and 5 deletions

View File

@ -27,7 +27,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.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.19.4-alpha.17", "lemmy-js-client": "0.19.4-alpha.18",
"prettier": "^3.2.5", "prettier": "^3.2.5",
"ts-jest": "^29.1.0", "ts-jest": "^29.1.0",
"typescript": "^5.4.4" "typescript": "^5.4.4"

View File

@ -30,8 +30,8 @@ devDependencies:
specifier: ^29.5.0 specifier: ^29.5.0
version: 29.7.0(@types/node@20.12.4) version: 29.7.0(@types/node@20.12.4)
lemmy-js-client: lemmy-js-client:
specifier: 0.19.4-alpha.17 specifier: 0.19.4-alpha.18
version: 0.19.4-alpha.17 version: 0.19.4-alpha.18
prettier: prettier:
specifier: ^3.2.5 specifier: ^3.2.5
version: 3.2.5 version: 3.2.5
@ -2357,8 +2357,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/lemmy-js-client@0.19.4-alpha.17: /lemmy-js-client@0.19.4-alpha.18:
resolution: {integrity: sha512-dFuahVjljCLvVCZ4iU2+cyPtCfGIXedmIN7awYBu4w9uxLFBXIYSfkRiyAmwv3vpgotIADaqwBa3p7/mDdiqOg==} resolution: {integrity: sha512-CUKRIiINZF2zOfK5WzBDF071LjMmRBFHwiSYBMGJyQP1zu8sPKCb/ptg25WWrf79Y4uOaVLctgHg3oEUXmSUmQ==}
dev: true dev: true
/leven@3.1.0: /leven@3.1.0:

View File

@ -74,6 +74,11 @@ test("Upload image and delete it", async () => {
let deleteUrl = `${alphaUrl}/pictrs/image/delete/${firstImage.local_image.pictrs_delete_token}/${firstImage.local_image.pictrs_alias}`; let deleteUrl = `${alphaUrl}/pictrs/image/delete/${firstImage.local_image.pictrs_delete_token}/${firstImage.local_image.pictrs_alias}`;
expect(deleteUrl).toBe(upload.delete_url); expect(deleteUrl).toBe(upload.delete_url);
// Make sure the uploader is correct
expect(firstImage.person.actor_id).toBe(
`http://lemmy-alpha:8541/u/lemmy_alpha`,
);
// delete image // delete image
const delete_form: DeleteImage = { const delete_form: DeleteImage = {
token: upload.files![0].delete_token, token: upload.files![0].delete_token,