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

Add support for text/html Accept header #16

Merged
merged 7 commits into from Nov 12, 2015
Merged

Add support for text/html Accept header #16

merged 7 commits into from Nov 12, 2015

Conversation

alde
Copy link
Contributor

@alde alde commented Nov 10, 2015

If accessing a route with text/html in the Accept header render a HTML
page instead of returning a JSON.

func LabelColor(status string) string {
switch status {
case "TASK_FAILED":
return "red"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colours feels more like a css thing. should the class perhaps just be "task-failed" or so?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is very true, maybe I should just export a ToLower function

@keis
Copy link
Collaborator

keis commented Nov 11, 2015

LGTM. Will give it a spin.

</div>
<div class="ui main container" style="padding-top: 50px;">
<div class="ui image content">
<img src="static/images/disappointed_minion.png">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess this should be /static/..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! that's probably why it breaks on that one route

alde added a commit that referenced this pull request Nov 12, 2015
Add support for text/html Accept header
@alde alde merged commit dd9defb into master Nov 12, 2015
@alde alde deleted the html-view branch November 13, 2015 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants