Skip to content

Commit

Permalink
manual formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
derGraph committed Dec 4, 2024
1 parent ee9170a commit b1fa047
Showing 10 changed files with 37 additions and 32 deletions.
1 change: 0 additions & 1 deletion src/routes/api/+server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { lucia } from '$lib/server/auth';
import { error } from '@sveltejs/kit';

// This handler will respond to PUT, PATCH, DELETE, etc.
Original file line number Diff line number Diff line change
@@ -25,14 +25,14 @@ export async function GET(event) {
let requestedFiletype = requestedMedia.split('.')[1];
try {
if (event.locals.user?.username == requestedUsername) {
let userdata = await prisma.media.findFirstOrThrow({
await prisma.media.findFirstOrThrow({
where: {
username: event.locals.user?.username,
id: requestedName
}
});
} else if (event.locals.user?.username) {
let userdata = await prisma.media.findFirstOrThrow({
await prisma.media.findFirstOrThrow({
where: {
username: requestedUsername,
id: requestedName,
@@ -47,7 +47,7 @@ export async function GET(event) {
}
});
} else {
let userdata = await prisma.media.findFirstOrThrow({
await prisma.media.findFirstOrThrow({
where: {
username: requestedUsername,
id: requestedName,
1 change: 0 additions & 1 deletion src/routes/sign_up/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import errorStore from '$lib/errorStore.js';
let { form } = $props();
1 change: 0 additions & 1 deletion src/routes/trips/[trip]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async (event) => {
19 changes: 17 additions & 2 deletions src/routes/trips/[trip]/+page.svelte
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
import errorStore from '$lib/errorStore.js';
import Leaflet from '$lib/Leaflet.svelte';
import { getProfilePicture, parseDate } from '$lib/functions.js';
import Tiptap from '$lib/Tiptap/+Tiptap.svelte';
import type { User } from '@prisma/client';
import { Avatar } from '@skeletonlabs/skeleton';
import type { LatLngExpression } from 'leaflet';
@@ -23,7 +22,23 @@
description: any;
} = $state({
description: "",
crew: [{ username: "no", email: "no", firstName: null, lastName: null, description: null, profilePictureId: "", dateOfBirth: null, roleId: "user", activeTripId: "", lastPing: new Date, skipperedLengthMotor: 0, skipperedLengthSail: 0, crewedLengthMotor: 0, crewedLengthSail:0, recalculate: false }],
crew: [{
username: "no",
email: "no",
firstName: null,
lastName: null,
description: null,
profilePictureId: "",
dateOfBirth: null,
roleId: "user",
activeTripId: "",
lastPing: new Date,
skipperedLengthMotor: 0,
skipperedLengthSail: 0,
crewedLengthMotor: 0,
crewedLengthSail:0,
recalculate: false
}],
name: undefined,
length_sail: undefined,
length_motor: undefined,
1 change: 0 additions & 1 deletion src/routes/trips/edit/[trip]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async (event) => {
18 changes: 17 additions & 1 deletion src/routes/trips/edit/[trip]/+page.svelte
Original file line number Diff line number Diff line change
@@ -23,7 +23,23 @@
description: any;
} = $state({
description: "",
crew: [{ username: "no", email: "no", firstName: null, lastName: null, description: null, profilePictureId: "", dateOfBirth: null, roleId: "user", activeTripId: "", lastPing: new Date, crewedLengthMotor: 0, crewedLengthSail: 0, skipperedLengthMotor: 0, skipperedLengthSail: 0, recalculate: false }],
crew: [{
username: "no",
email: "no",
firstName: null,
lastName: null,
description: null,
profilePictureId: "",
dateOfBirth: null,
roleId: "user",
activeTripId: "",
lastPing: new Date,
crewedLengthMotor: 0,
crewedLengthSail: 0,
skipperedLengthMotor: 0,
skipperedLengthSail: 0,
recalculate: false
}],
name: undefined,
length_sail: undefined,
length_motor: undefined,
19 changes: 0 additions & 19 deletions src/routes/upload/+page.svelte

This file was deleted.

1 change: 0 additions & 1 deletion src/routes/user/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { lucia } from '$lib/server/auth';
import { redirect, type Handle } from '@sveltejs/kit';

export async function load({ locals }) {
2 changes: 0 additions & 2 deletions src/routes/user/[requestedUser]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { error } from '@sveltejs/kit';

/** @type {import('./$types').PageServerLoad} */
export async function load({ params }) {
let requestedUser = params.requestedUser;

0 comments on commit b1fa047

Please sign in to comment.