Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDISCROWD-6680 update swagger header #444

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added static/img/gigwork-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions templates/flasgger_custom_head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script>
async function setImage(selector, timeout = 10000) {
const start = Date.now();
// wait for image to exist
while (Date.now() - start < timeout) {
const el = document.querySelector(selector);
if (el) {
// create link to home page
let link = document.createElement('a')
link.href = "/"
el.parentNode.insertBefore(link, el);
link.appendChild(el);
// set image
el.src = "/static/img/gigwork-white.png";
el.height = "75"
return;
}
await new Promise(resolve => setTimeout(resolve, 10));
}
return;
}
window.addEventListener('load', function (){
let imgSelector = "#swagger-ui > section > div.topbar > div > div > a > img";
setImage(imgSelector);
});
</script>
1 change: 1 addition & 0 deletions templates/help/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ <h1><strong>{{brand}}</strong>: API Help</h1>
low level API calls, providing a more simple and easy to use API. PyBossa.JS is available at the server for every project, but if you prefer to download it
you can do it from its official <a href="http://github.com/PyBossa/pybossa.js">repository</a>.</p>
<hr>
<p>View GIGwork <a href="/apidocs">API documentation</a>.</p>
<h2>Projects API end point</h2>
<p>
For example, if you want to <strong>get a list of available projects</strong> on this server,
Expand Down
Loading