Skip to content

Commit

Permalink
permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Oct 21, 2024
1 parent 5b4490f commit e7706bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/data/user/user.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use server";
import { PRODUCT_NAME } from "@/constants";
import { generateOrganizationSlug } from "@/lib/utils";
import { supabaseAdminClient } from "@/supabase-clients/admin/supabaseAdminClient";
import { createSupabaseUserServerActionClient } from "@/supabase-clients/user/createSupabaseUserServerActionClient";
import { createSupabaseUserServerComponentClient } from "@/supabase-clients/user/createSupabaseUserServerComponentClient";
import type { SAPayload, SupabaseFileUploadOptions, Table } from "@/types";
Expand All @@ -27,8 +28,7 @@ export async function getIsAppAdmin(): Promise<boolean> {


export const createDefaultUserProfile = async (userId: string) => {
const supabase = createSupabaseUserServerComponentClient();
const { data, error } = await supabase.from('user_profiles').insert({
const { data, error } = await supabaseAdminClient.from('user_profiles').insert({
id: userId,
full_name: '',
user_name: '',
Expand All @@ -43,8 +43,7 @@ export const createDefaultUserProfile = async (userId: string) => {


export const createDefaultUserPrivateInfo = async (userId: string) => {
const supabase = createSupabaseUserServerComponentClient();
const { data, error } = await supabase
const { data, error } = await supabaseAdminClient
.from('user_private_info')
.insert({
id: userId,
Expand Down

0 comments on commit e7706bc

Please sign in to comment.