Closed Capoouo closed 3 months ago
Sorry about the late reply.
It seems that I've been having trouble replicating this issue. I've tried it with two different accounts that have not yet redeemed a code, and it successfully redeemed and sent a notification.
Does the code.js
format looks like this?
module.exports = [
{
"code": "STARRAILGIFT",
"rewards": "50 Stellar Jades + EXP materials"
},
{
"code": "BTN5EL69P6K3",
"rewards": "50 Stellar Jades + 10k credits"
}
];
對不起,回復晚了。
似乎我在複製這個問題時遇到了麻煩。我已經嘗試使用兩個尚未兌換代碼的不同帳戶,它成功兌換併發送了通知。
格式看起來像這樣嗎?
code.js
module.exports = [ { "code": "STARRAILGIFT", "rewards": "50 Stellar Jades + EXP materials" }, { "code": "BTN5EL69P6K3", "rewards": "50 Stellar Jades + 10k credits" } ];
If I directly clone this project into Docker, it will cause the issue I mentioned. Without code.js, there will be no execution of the redeem function. If code.js is present, it will perform the redeem operation, but there will be no notifications, and it will not write back to code.js within Docker This is the code.js file in my Docker setup. Currently, it successfully redeems the latest codes, but it does not write back the changes And this code.js is the one I added myself
I have found the problem and fixed it in the latest commit. The issue was that code.js
wasn't properly mounted in the docker-compose.yml
file.
I re-pulled the code and ran it using Docker as instructed. I found that if code.js is missing, check-code-redeem will not run or execute. If code.js is present, it runs and helps redeem the code, but it does not write to code.js and there is no notification