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