Closes #222
@@ -72,8 +72,8 @@ export const validateUrl: RequestHandler = async (req, res, next) => {
return res.status(400).json({ error: "No target has been provided." });
// validate URL length
- if (req.body.target.length > 1023) {
- return res.status(400).json({ error: "Maximum URL length is 1023." });
+ if (req.body.target.length > 2040) {
+ return res.status(400).json({ error: "Maximum URL length is 2040." });
}
// Validate URL
@@ -20,7 +20,7 @@ export async function createLinkTable(knex: Knex) {
.references("id")
.inTable("domains");
table.string("password");
- table.string("target", 1023).notNullable();
+ table.string("target", 2040).notNullable();
table
.integer("user_id")