scaleracademy/sclr.ac-backend

TODO: in custom short code creation validate less than 8 chars

championswimmer opened this issue · 3 comments

In the route, we must validate the requested code is <= 8 char, and if not, throw send an error response

const shortCode = req.params.code // TODO: validate < 8 char

@championswimmer assign this task to me I'll start working on it.

@kudoabhijeet I guess it isn't resolved yet, We can't also use 8 length of characters but as in the issue, It's also requested.

@harikanani this is a url shortner, so we have to keep a check if the requested shortcode is <=8 always, all other cases (>8) should throw an error. Probably, 400 (Bad Request).