Skip to content

Commit 43634f5

Browse files
committed
🛠FIX: Validacion
Se realizael cambio de las validaciones para la imagenes Issue #6
1 parent d13eff6 commit 43634f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎app/src/tools/Helpers.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Helper {
1616
const { body = {}, params } = request;
1717
const { field = "" } = params;
1818
params.field = (/_?id/.test(field)) ? "_id" : field;
19-
if (params.Model === "pokemon") {
19+
if (params.Model === "pokemon" && !body.img) {
2020
const { name = "default" } = body;
2121
const IMG = this.formatString(name);
2222
body.img = `${process.env.HOST}/pokemons/${IMG}.jpg`;

0 commit comments

Comments
 (0)