Sfoglia il codice sorgente

update model and routes js

DevYK 3 anni fa
parent
commit
acb37780a0
2 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 2 1
      model/moralis_sdk.js
  2. 2 0
      routes/sdk.js

+ 2 - 1
model/moralis_sdk.js

@@ -155,8 +155,9 @@ const getAllTokenWithdrawInfoLists = async (obj) => {
 const getAllTotkenPrice = async () => {
     try {
         console.log('当前环境:', process.env.NODE_ENV);
-        console.log("getAllTotkenPrice in"); // Prints "value"
+        console.log("getAllTotkenPrice in",reids_token_config); // Prints "value"
         var token_price_key = reids_token_config.TOKENPRICE;
+        console.log("getAllTotkenPrice token_price_key=",token_price_key);
         return await redis.readRedis(token_price_key)
     } catch (error) {
         console.error("getTotkenPrice=", error);

+ 2 - 0
routes/sdk.js

@@ -9,6 +9,7 @@ router.prefix('/sdk');
  * @param {*} ctx 
  */
 async function getAllTotkenPrice(ctx) {
+    console.log('getTotkenPrice in:')
     var ret = await moralis.getAllTotkenPrice()
     console.log('getTotkenPrice result:', ret)
     if (ret)
@@ -55,6 +56,7 @@ async function getAllTokenWithdrawInfoLists(ctx) {
     ctx.body = await moralis.getAllTokenWithdrawInfoLists(ctx);
 }
 
+//出金
 async function withdraw(ctx) {
     if (ctx.request == null || ctx.request.body == null) {
         ctx.body = utils.toJson(-1, null, "request error. ");