Skip to content

Commit

Permalink
Get Typed Ref working
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 11, 2024
1 parent fb8025f commit 3bda141
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
8 changes: 7 additions & 1 deletion api/routes/marti-mission-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ export default async function router(schema: Schema, config: Config) {
body: Type.Object({
content: Type.String()
}),
res: GenericMartiResponse
res: Type.Object({
version: Type.String(),
type: Type.String(),
data: MissionLog,
messages: Type.Optional(Type.Array(Type.String())),
nodeId: Type.Optional(Type.String())
})
}, async (req, res) => {
try {
const user = await Auth.as_user(config, req);
Expand Down
4 changes: 3 additions & 1 deletion api/web/src/components/CloudTAK/Menu/Mission/MissionLogs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ const props = defineProps({
}
})
interface MissionLogInterface extends MissionLog {};
const createLog = ref('');
const logs = ref<any[]>([]);
const logs = ref<MissionLog[]>([]);
const loading = ref({
logs: false
});
Expand Down
47 changes: 45 additions & 2 deletions api/web/src/derived-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6303,7 +6303,40 @@ export interface paths {
path?: never;
cookie?: never;
};
get?: never;
/** Helper API to add a log to a mission */
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
total: number;
items: {
id: string;
content: string;
creatorUid: string;
missionNames: string[];
servertime: string;
dtg?: string;
created: string;
contentHashes: unknown[];
keywords: unknown[];
}[];
};
};
};
};
};
put?: never;
/** Helper API to add a log to a mission */
post: {
Expand Down Expand Up @@ -6382,7 +6415,17 @@ export interface paths {
"application/json": {
version: string;
type: string;
data: unknown;
data: {
id: string;
content: string;
creatorUid: string;
missionNames: string[];
servertime: string;
dtg?: string;
created: string;
contentHashes: unknown[];
keywords: unknown[];
};
messages?: string[];
nodeId?: string;
};
Expand Down

0 comments on commit 3bda141

Please sign in to comment.