Merge branch 'main' into merge-actors

This commit is contained in:
2026-05-20 17:53:54 +02:00
3 changed files with 67 additions and 3 deletions

4
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.49.7",
"version": "0.49.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.49.7",
"version": "0.49.8",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@@ -92,7 +92,7 @@
"overrides": {
"vite": "$vite"
},
"version": "0.49.7",
"version": "0.49.8",
"imports": {
"#/*": "./*.js"
}

View File

@@ -200,6 +200,10 @@ export async function createStash(newStash, sessionUser) {
throw new HttpError('You are not authenthicated', 401);
}
if (!newStash) {
throw new HttpError('Missing new stash', 400);
}
verifyStashName(newStash);
try {
@@ -224,6 +228,14 @@ export async function updateStash(stashIdOrSlug, updatedStash, sessionUser) {
throw new HttpError('You are not authenthicated', 401);
}
if (!stashIdOrSlug) {
throw new HttpError('Missing stash ID or slug', 400);
}
if (!updatedStash) {
throw new HttpError('Missing updated stash', 400);
}
if (updatedStash.name) {
verifyStashName(updatedStash);
}
@@ -260,6 +272,10 @@ export async function removeStash(stashId, sessionUser) {
throw new HttpError('You are not authenthicated', 401);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -283,6 +299,14 @@ export async function removeStash(stashId, sessionUser) {
}
export async function stashActor(actorId, stashId, sessionUser) {
if (!actorId) {
throw new HttpError('Missing actor ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -324,6 +348,14 @@ export async function stashActor(actorId, stashId, sessionUser) {
}
export async function unstashActor(actorId, stashId, sessionUser) {
if (!actorId) {
throw new HttpError('Missing actor ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -367,6 +399,14 @@ export async function unstashActor(actorId, stashId, sessionUser) {
}
export async function stashScene(sceneId, stashId, sessionUser) {
if (!sceneId) {
throw new HttpError('Missing scene ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -409,6 +449,14 @@ export async function stashScene(sceneId, stashId, sessionUser) {
}
export async function unstashScene(sceneId, stashId, sessionUser) {
if (!sceneId) {
throw new HttpError('Missing scene ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -448,6 +496,14 @@ export async function unstashScene(sceneId, stashId, sessionUser) {
}
export async function stashMovie(movieId, stashId, sessionUser) {
if (!movieId) {
throw new HttpError('Missing movie ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {
@@ -489,6 +545,14 @@ export async function stashMovie(movieId, stashId, sessionUser) {
}
export async function unstashMovie(movieId, stashId, sessionUser) {
if (!movieId) {
throw new HttpError('Missing movie ID', 400);
}
if (!stashId) {
throw new HttpError('Missing stash ID', 400);
}
const stash = await fetchStashById(stashId, sessionUser);
if (!stash) {