Added Data to SituationsBoard
This commit is contained in:
@@ -2,10 +2,16 @@ import { Mission, MissionSdsLog, Prisma } from "@repo/db";
|
||||
import axios from "axios";
|
||||
import { serverApi } from "_helpers/axios";
|
||||
|
||||
export const getMissionsAPI = async (filter?: Prisma.MissionWhereInput) => {
|
||||
export const getMissionsAPI = async (
|
||||
filter?: Prisma.MissionWhereInput,
|
||||
include?: Prisma.MissionInclude,
|
||||
orderBy?: Prisma.MissionOrderByWithRelationInput,
|
||||
) => {
|
||||
const res = await axios.get<Mission[]>("/api/missions", {
|
||||
params: {
|
||||
filter: JSON.stringify(filter),
|
||||
include: JSON.stringify(include),
|
||||
orderBy: JSON.stringify(orderBy),
|
||||
},
|
||||
});
|
||||
if (res.status !== 200) {
|
||||
|
||||
Reference in New Issue
Block a user