15

Hello fellow devRanters, look what I found in our API constants on this fine day!

LIST_USERS: '/api/GetUsers',
USERS_WITH_QUERY:'/api/GetUsers?Query=',
MORE_USERS: '/api/GetUsers?Token=',

You get what you pay for, you get what you pay for, you get what you- AAAAAAAAAAAAAAAAAAAARRRGGGGG!!!!!!!!!

Comments
  • 1
    Business people who underate their development efforts (usually in the form of economic compensation) by overating productivity deserve this
  • 1
    I have no idea about anything web related, tho this looks kind of fucky.
  • 3
    I am writing my API constant like the example given by OP.

    Could you please tell what is wrong with it so I can fix it? Should I put it in .env file?
  • 0
    @mr-user .... its the same endpoint, 3 times in row...and use the searchparam API to build the search parameters dynamically and call it a day
  • -1
    Cool!
  • 1
    @fullstackclown

    So I should only have 1 constant /api/GetUsers and the rest should be dynamically build by function/method. In other word ?token and ?Query should be inside a function?
  • 0
    @mr-user I mean, that's the most DRY (and flexible) way to do it in my opinion, but what do I know, I'm just a clown 🤡

    DRY here standing for the adage "Don't Repeat Yourself"
Add Comment