-
-
Save c4software/8b5122405b38f4c933d6a4490f45e1ad to your computer and use it in GitHub Desktop.
Les constantes
This file contains hidden or 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
| import STATUS_LIST from "constantes"; | |
| import SERVER from "constantes"; | |
| import client from "dao"; | |
| // … | |
| if(status === STATUS_LIST.CONFIRMED){ | |
| // Code | |
| } else if(status === STATUS_LIST.PENDING) { | |
| // Code | |
| } | |
| // … | |
| wretch(`${SERVER}/list`) | |
| .get() | |
| .json(json => { | |
| // Code | |
| }) | |
| // Voir même ! | |
| client | |
| .getAll() | |
| .then((liste) => { | |
| console.log(liste); | |
| }) | |
This file contains hidden or 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
| // … | |
| if(status === 300){ | |
| // Code | |
| } else if(status === 100) { | |
| // Code | |
| } | |
| // … | |
| wretch("http://www.monapi.com/us-central/demo/v1/endpoint/client/list") | |
| .get() | |
| .json(json => { | |
| // Code | |
| }) | |
This file contains hidden or 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
| export const MENU_API_KEY_FIREBASE = "menuApi"; | |
| export const SERVER = "http://www.monapi.com/us-central/demo/v1/endpoint/client/"; | |
| export const STATUS_LIST = { | |
| ERROR: 0, | |
| PENDING: 100, | |
| VALIDATED: 200, | |
| CONFIRMED: 300, | |
| COOKING: 400, | |
| READY: 500, | |
| DELIVERING: 600, | |
| DELIVERED: 700, | |
| CLOSED: 800, | |
| CANCELLED: 1000, | |
| }; | |
| export const ACL = { | |
| ADMIN: "admin", | |
| ZONES: "zones", | |
| SYSTEMTIMES: "systemTimes", | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment