hadalin / chrome-hidefedora

Chrome extension that removes troll youtube commenters (development discontinued)
http://hidefedora.hadalin.me
MIT License
60 stars 9 forks source link

Don't return html when reporting #25

Closed helmus closed 9 years ago

helmus commented 9 years ago

When I click the report button, it does a post to

https://jhvisser.com/hidefedora/index.php

This server responds with the full html page of index.php. That doesn't make any sense. It should just return some json or nothing at all.

Fogest commented 9 years ago

You're reporting this on the client side part of the extension. This relates to the web. But you are correct I guess I am returning the page. I will split it to a separate end point so that the index page is for manual submission and there is a separate endpoint for extension reporting. On Nov 30, 2014 4:52 PM, "helmus" notifications@github.com wrote:

When I click the report button, it does a post to

https://jhvisser.com/hidefedora/index.php

This server responds with the full html page of index.php. That doesn't make any sense. It should just return some json or nothing at all.

— Reply to this email directly or view it on GitHub https://github.com/hadalin/chrome-hidefedora/issues/25.

helmus commented 9 years ago

It works, that's all good. Just returning a full html page doesn't seem very hygienic. Using a more descriptive end point would also be awesome. Let's keep it classy :tophat:

Fogest commented 9 years ago

Yes that is true. It would also allow me to separate the submission calls. I will switch the manual page to use ajax submission so it can call to the endpoint just like the extension. That way they both are acting in the same way with how they report. On Nov 30, 2014 5:00 PM, "helmus" notifications@github.com wrote:

It works, that's all good. Just returning a full html page doesn't seem very hygienic. Using a more descriptive end point would also be awesome. Let's keep it classy [image: :tophat:]

— Reply to this email directly or view it on GitHub https://github.com/hadalin/chrome-hidefedora/issues/25#issuecomment-65002284 .

hadalin commented 9 years ago

Let's keep it classy :tophat:

Careful there with that hat sir :D

hadalin commented 9 years ago

This is a backend problem.

helmus commented 9 years ago

@Fogest You should probably put your backend code in a separate repo and put that repo on github somewhere

hadalin commented 9 years ago

@helmus it is https://github.com/Fogest/hidefedora-web