Last active
August 1, 2019 23:00
-
-
Save parzibyte/86ef5c6e891da508c7f25d2d864c4f62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const establecerImpresoraComoPredeterminada = nombreImpresora => { | |
loguear("Estableciendo impresora..."); | |
fetch(RUTA_API + "/impresora", { | |
method: "PUT", | |
body: JSON.stringify(nombreImpresora) | |
}) | |
.then(r => r.json()) | |
.then(respuesta => { | |
refrescarNombreDeImpresoraSeleccionada(); | |
if (respuesta != nombreImpresora) { | |
loguear(`No se pudo establecer la impresora con el nombre ${nombreImpresora}`); | |
} else { | |
loguear(`Impresora ${nombreImpresora} establecida correctamente`); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment