Fixed docker deploments, moved files to _folders in dispatch app
This commit is contained in:
19
apps/dispatch/app/_querys/connected-user.ts
Normal file
19
apps/dispatch/app/_querys/connected-user.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { ConnectedAircraft, ConnectedDispatcher, Prisma } from "@repo/db";
|
||||
import axios from "axios";
|
||||
|
||||
export const getConnectedUserAPI = async (
|
||||
filter?: Prisma.KeywordWhereInput,
|
||||
) => {
|
||||
const res = await axios.get<(ConnectedAircraft | ConnectedDispatcher)[]>(
|
||||
"/api/connected-user",
|
||||
{
|
||||
params: {
|
||||
filter: JSON.stringify(filter),
|
||||
},
|
||||
},
|
||||
);
|
||||
if (res.status !== 200) {
|
||||
throw new Error("Failed to fetch Connected User");
|
||||
}
|
||||
return res.data;
|
||||
};
|
||||
Reference in New Issue
Block a user