8

A Rant about my past self!

I thought I never did this shit myself! While restoring a old game server with it's various plugins and infra, I found this randomly.

It was for a Admin Panel that was never used in anything commercial. And I think no one ever saw this reponse anyway since I built the frontend that used it as well.

I'm still embarrassed that 16yo me did this exact thing, I think is just plain stupid today.

https://youtu.be/nSKp2StlS6s

Comments
  • 2
    Don't worry, Google does that in their API too :^)
  • 1
    They just check the success Boolean, and use their own message, no way to ever find out.
  • 1
    DU HAST'S NICHT HINBEKOMMEN.
    Jetzt aber.
  • 1
    @Ranchonyx Tbh I learned a lot with writing my own Webserver from scratch back then.

    It was in Java and even had a custom plugin system similar to bukkit.

    My own defence for the blunder above was that I probably didn't even know the term "REST".

    The frontend used a framework that isn't that popular anymore called "Vanilla JS" ( http://vanilla-js.com/ ). 😁 Not even jQuery.
  • 0
    I love success: false
  • 0
    If(success) nice
  • 1
    what's so embarrassing about this?
  • 2
    @bananaerror I guess the German part lol? Pretty funny
  • 1
    @bananaerror @lopu The fact that the API returns a 200 OK but is actually an error (success: false).

    I watched the linked Video a bunch and found it pretty funny. Then I discovered that I did one of the things they mock about.
  • 0
    @LinusCDE isn't that how restful is meant to work though?
  • 0
    @lopu I don't think so. REST tries to make access to data more standardized. Since a lot of HTTP Methods are used for certain actions I couldn't imagine why e.g. a faulty fetch shouln't return a 200 OK. Especially since I don't know of a "standardized JSON key" for marking an error instead of using the already existing Status Codes.
Add Comment