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