Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/catto-labs/drive into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pnxl committed Aug 13, 2023
2 parents 280868e + 2419d67 commit eaf47ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/routes/dashboard/[workspace_id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Match,
} from "solid-js";
import { A, Title, useNavigate } from "solid-start";
import { logOutUser } from "@/stores/auth";
import { auth, logOutUser } from "@/stores/auth";

import IconDotsHorizontalCircleOutline from "~icons/mdi/dots-horizontal-circle-outline";
import IconStarOutline from "~icons/mdi/star-outline";
Expand Down Expand Up @@ -128,7 +128,7 @@ const Page: Component = () => {
</button>
<div class="flex flex-col gap-0.5 text-text">
<A
href="/dashboard"
href={`/dashboard/${auth.profile!.root_workspace_id}`}
class="py-2 pl-2 pr-4 flex flex-row items-center gap-2 bg-gradient-to-r from-lavender/30 to-mauve/20 transition rounded-md"
>
<IconFolderAccountOutline class="w-6 h-6" />
Expand Down
6 changes: 1 addition & 5 deletions supabase/functions/upload-file/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ serve(async (req: Request) => {
const formData = await req.formData();
const formDataFiles = formData.getAll("files") as File[];

const workspaceId = formData.get("workspace_id") as string | undefined;
if (user_profile && !workspaceId) return json({
success: false,
message: "Authenticated users should always specify a workspace ID."
});
const workspaceId = (formData.get("workspace_id") as string | undefined) ?? user_profile?.root_workspace_id ?? undefined;

const isPrivate = parseInt((formData.get("private") as string | null) ?? "1");
const newUploadsInDatabase: UploadedFile[] = [];
Expand Down

0 comments on commit eaf47ac

Please sign in to comment.