Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jun 21, 2024
1 parent bc9bd9a commit 8389d17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion api/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export const LayerAlertResponse = createSelectSchema(schemas.LayerAlert, {

export const ImportResponse = createSelectSchema(schemas.Import, {});

export const TaskResponse = createSelectSchema(schemas.Task, {});
export const TaskResponse = createSelectSchema(schemas.Task, {
id: Type.Integer(),
});

export const IconsetResponse = createSelectSchema(schemas.Iconset, {
version: Type.Integer(),
Expand Down
6 changes: 3 additions & 3 deletions api/routes/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ export default async function router(schema: Schema, config: Config) {
}
});

await schema.get('/task/prefix/:prefix/readme', {
await schema.get('/task/prefix/:task/readme', {
name: 'Task README',
group: 'Task',
description: 'Return README Contents',
params: Type.Object({
prefix: Type.String()
task: Type.Integer()
}),
res: Type.Object({
body: Type.String()
Expand All @@ -202,7 +202,7 @@ export default async function router(schema: Schema, config: Config) {
try {
await Auth.as_user(config, req);

const task = await config.models.Task.from(req.params.prefix);
const task = await config.models.Task.from(req.params.task);

if (task.readme) {
const readmeres = await fetch(task.readme);
Expand Down

0 comments on commit 8389d17

Please sign in to comment.