pseudosubs-v1/srv/LinksAnimes/modificarLink.ts

20 lines
442 B
TypeScript
Raw Normal View History

2024-02-29 13:15:31 +00:00
import {sqliteConnection as con} from "../index";
export const modificarLink = (req: any, res: any) => {
2018-12-13 01:10:51 +00:00
const ep_ID = req.body.ep_ID;
con.query(
`UPDATE eps SET visitas=visitas+1 WHERE ep_ID=${ep_ID};`,
2024-02-29 13:15:31 +00:00
(err) => {
if (!err) {
res.send("Actualizado con exito.");
} else {
console.log("Error al actualizar el episodio :c");
}
}
);
};