implemented connectedDispatch record for dispatcher

This commit is contained in:
PxlLoewe
2025-05-01 21:48:25 -07:00
parent 504ef3cdb8
commit 26e71bcaa8
16 changed files with 287 additions and 115 deletions

View File

@@ -1,5 +1,3 @@
"use server";
export interface Dispatcher {
userId: string;
lastSeen: string;
@@ -9,10 +7,3 @@ export interface Dispatcher {
name: string;
socketId: string;
}
export const getDispatcher = async () => {
const res = await fetch(`
${process.env.NEXT_PUBLIC_DISPATCH_SERVER_URL}/dispatcher`);
const data = await res.json();
return data as Dispatcher[];
};