Skip to content

Commit

Permalink
Update Docs
Browse files Browse the repository at this point in the history
Ref: #250
  • Loading branch information
ingalls committed Mar 2, 2022
1 parent e648304 commit 84b0f5c
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 56 deletions.
57 changes: 29 additions & 28 deletions api/doc/assets/main.bundle.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions api/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ <h2>{{__ "Query Parameter(s)"}}</h2>
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{#if ../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}
</td>
{{#unless this.Type compare=null}}
Expand Down Expand Up @@ -254,7 +256,9 @@ <h2>{{__ "Request Body"}}</h2>
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{#if ../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}
</td>
{{#unless this.Type compare=null}}
Expand Down Expand Up @@ -302,7 +306,9 @@ <h2>{{__ @key}}</h2>
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{#if ../template.showRequiredLabels}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
{{/if}}</td>
{{#if ../../_hasType}}
<td class="code">
Expand Down
8 changes: 8 additions & 0 deletions api/lib/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ class Job {
job.s3 = `s3://${process.env.Bucket}/${process.env.StackName}/job/${job.id}/source.geojson.gz`;
}

if (job.output && job.output.validated) {
job.s3_validated = `s3://${process.env.Bucket}/${process.env.StackName}/job/${job.id}/validated.geojson.gz`;
}

return job;
});
}
Expand Down Expand Up @@ -355,6 +359,10 @@ class Job {
job.s3 = `s3://${process.env.Bucket}/${process.env.StackName}/job/${job.id}/source.geojson.gz`;
}

if (job.output && job.output.validated) {
job.s3_validated = `s3://${process.env.Bucket}/${process.env.StackName}/job/${job.id}/validated.geojson.gz`;
}

return job;
}

Expand Down
48 changes: 24 additions & 24 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/routes/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async function router(schema, config) {
if (!req.auth || !req.auth.level || req.auth.level !== 'sponsor') {
for (const d of data) {
delete d.s3;
delete d.s3_validated;
}
}

Expand Down Expand Up @@ -98,6 +99,7 @@ async function router(schema, config) {

if (!req.auth || !req.auth.level || req.auth.level !== 'sponsor') {
delete data.s3;
delete data.s3_validated;
}

return res.json(data);
Expand Down
4 changes: 3 additions & 1 deletion api/routes/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ async function router(schema, config) {

if (!req.auth || !req.auth.level || req.auth.level !== 'sponsor') {
for (const j of jobs) {
delete j.s3;
delete job.s3;
delete job.s3_validated;
}
}

Expand Down Expand Up @@ -64,6 +65,7 @@ async function router(schema, config) {

if (!req.auth || !req.auth.level || req.auth.level !== 'sponsor') {
delete job.s3;
delete job.s3_validated;
}

return res.json(job);
Expand Down
3 changes: 3 additions & 0 deletions api/schema/res.Job.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"s3": {
"type": ["boolean", "string"]
},
"s3_validated": {
"type": ["boolean", "string"]
},
"run": {
"type": "integer"
},
Expand Down

0 comments on commit 84b0f5c

Please sign in to comment.