Skip to content

Commit

Permalink
Add List Logs endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 11, 2024
1 parent 448f842 commit 4c5a83f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api/routes/marti-mission-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ import TAKAPI, {
} from '../lib/tak-api.js';

export default async function router(schema: Schema, config: Config) {
await schema.post('/marti/missions/:name/log', {
await schema.get('/marti/missions/:name/log', {
name: 'List Logs',
group: 'MartiMissionLog',
params: Type.Object({
name: Type.String(),
}),
description: 'Helper API to add a log to a mission',
body: Type.Object({
content: Type.String()
}),
res: Type.Object({
total: Type.Integer(),
items: Type.Array(MissionLog)
Expand All @@ -30,7 +27,6 @@ export default async function router(schema: Schema, config: Config) {
const user = await Auth.as_user(config, req);

const auth = (await config.models.Profile.from(user.email)).auth;
const creatorUid = user.email;
const api = await TAKAPI.init(new URL(String(config.server.api)), new APIAuthCertificate(auth.cert, auth.key));

const opts: Static<typeof MissionOptions> = req.headers['missionauthorization']
Expand Down

0 comments on commit 4c5a83f

Please sign in to comment.