update fix eslint,
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// TBA
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_NOTIFICATIONS } from '@/constants';
|
||||
import { RecordModel } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export async function getAllNotifications(options = {}): Promise<RecordModel[]> {
|
||||
return pb.collection(COL_NOTIFICATIONS).getFullList(options);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// TBA
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_NOTIFICATIONS } from '@/constants';
|
||||
import { RecordModel } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export async function getNotificationById(id: string): Promise<RecordModel> {
|
||||
return pb.collection(COL_NOTIFICATIONS).getOne(id);
|
||||
|
@@ -1,3 +1,3 @@
|
||||
export function helloCustomer() {
|
||||
export function helloCustomer(): string {
|
||||
return 'Hello from Customers module!';
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
// api method for update notification record
|
||||
// RULES:
|
||||
// TBA
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_NOTIFICATIONS } from '@/constants';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
import type { NotificationFormProps } from '@/components/dashboard/notification/type.d';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export async function MarkOneAsRead(id: string): Promise<RecordModel> {
|
||||
return pb.collection(COL_NOTIFICATIONS).update(id, { read: true });
|
||||
|
Reference in New Issue
Block a user