add medreport schema
This commit is contained in:
@@ -22,7 +22,7 @@ import { Database } from '@kit/supabase/database';
|
||||
|
||||
import { createNotificationsService } from './notifications.service';
|
||||
|
||||
type Notification = Database['public']['Tables']['notifications'];
|
||||
type Notification = Database['medreport']['Tables']['notifications'];
|
||||
|
||||
/**
|
||||
* @name createNotificationsApi
|
||||
|
||||
@@ -4,7 +4,7 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
type Notification = Database['public']['Tables']['notifications'];
|
||||
type Notification = Database['medreport']['Tables']['notifications'];
|
||||
|
||||
export function createNotificationsService(client: SupabaseClient<Database>) {
|
||||
return new NotificationsService(client);
|
||||
@@ -14,7 +14,10 @@ class NotificationsService {
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
|
||||
async createNotification(params: Notification['Insert']) {
|
||||
const { error } = await this.client.from('notifications').insert(params);
|
||||
const { error } = await this.client
|
||||
.schema('medreport')
|
||||
.from('notifications')
|
||||
.insert(params);
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user