Merge branch 'main' into merge-actors
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx-web",
|
"name": "traxxx-web",
|
||||||
"version": "0.49.7",
|
"version": "0.49.8",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "0.49.7",
|
"version": "0.49.8",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@brillout/json-serializer": "^0.5.8",
|
"@brillout/json-serializer": "^0.5.8",
|
||||||
"@dicebear/collection": "^7.0.5",
|
"@dicebear/collection": "^7.0.5",
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
"overrides": {
|
"overrides": {
|
||||||
"vite": "$vite"
|
"vite": "$vite"
|
||||||
},
|
},
|
||||||
"version": "0.49.7",
|
"version": "0.49.8",
|
||||||
"imports": {
|
"imports": {
|
||||||
"#/*": "./*.js"
|
"#/*": "./*.js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,6 +200,10 @@ export async function createStash(newStash, sessionUser) {
|
|||||||
throw new HttpError('You are not authenthicated', 401);
|
throw new HttpError('You are not authenthicated', 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!newStash) {
|
||||||
|
throw new HttpError('Missing new stash', 400);
|
||||||
|
}
|
||||||
|
|
||||||
verifyStashName(newStash);
|
verifyStashName(newStash);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -224,6 +228,14 @@ export async function updateStash(stashIdOrSlug, updatedStash, sessionUser) {
|
|||||||
throw new HttpError('You are not authenthicated', 401);
|
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) {
|
if (updatedStash.name) {
|
||||||
verifyStashName(updatedStash);
|
verifyStashName(updatedStash);
|
||||||
}
|
}
|
||||||
@@ -260,6 +272,10 @@ export async function removeStash(stashId, sessionUser) {
|
|||||||
throw new HttpError('You are not authenthicated', 401);
|
throw new HttpError('You are not authenthicated', 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stashId) {
|
||||||
|
throw new HttpError('Missing stash ID', 400);
|
||||||
|
}
|
||||||
|
|
||||||
const stash = await fetchStashById(stashId, sessionUser);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -283,6 +299,14 @@ export async function removeStash(stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function stashActor(actorId, 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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -324,6 +348,14 @@ export async function stashActor(actorId, stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function unstashActor(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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -367,6 +399,14 @@ export async function unstashActor(actorId, stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function stashScene(sceneId, 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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -409,6 +449,14 @@ export async function stashScene(sceneId, stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function unstashScene(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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -448,6 +496,14 @@ export async function unstashScene(sceneId, stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function stashMovie(movieId, 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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
@@ -489,6 +545,14 @@ export async function stashMovie(movieId, stashId, sessionUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function unstashMovie(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);
|
const stash = await fetchStashById(stashId, sessionUser);
|
||||||
|
|
||||||
if (!stash) {
|
if (!stash) {
|
||||||
|
|||||||
Reference in New Issue
Block a user