diff --git a/api/routes/marti-mission-logs.ts b/api/routes/marti-mission-logs.ts index 971291c63..d94592d17 100644 --- a/api/routes/marti-mission-logs.ts +++ b/api/routes/marti-mission-logs.ts @@ -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); diff --git a/api/web/src/components/CloudTAK/Menu/Mission/MissionLogs.vue b/api/web/src/components/CloudTAK/Menu/Mission/MissionLogs.vue index 673ae112f..f8bf264fc 100644 --- a/api/web/src/components/CloudTAK/Menu/Mission/MissionLogs.vue +++ b/api/web/src/components/CloudTAK/Menu/Mission/MissionLogs.vue @@ -84,8 +84,10 @@ const props = defineProps({ } }) +interface MissionLogInterface extends MissionLog {}; + const createLog = ref(''); -const logs = ref([]); +const logs = ref([]); const loading = ref({ logs: false }); diff --git a/api/web/src/derived-types.d.ts b/api/web/src/derived-types.d.ts index a50352a63..0f3a8cfed 100644 --- a/api/web/src/derived-types.d.ts +++ b/api/web/src/derived-types.d.ts @@ -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: { @@ -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; };