fix: make order processing authorized and recoverable
This commit is contained in:
1 parent
0ab7d62aa6
commit
7e42a6dcc6
15 files changed
+219
-129
No files matched your search
@@ -15,9 +15,7 @@ function windowForCutoff(cutoff,schedule,overrides=[]){
|
||||
const index=times.findIndex(time=>at(day,time)===end);if(index<0)invalid('截止时间必须与已配置的发送时点一致。');
|
||||
let start=index?at(day,times[index-1]):at(day,'00:00');
|
||||
if(index===0){
|
||||
const prior=dayOf(new Date(+date-DAY));
|
||||
const monday=new Date(day+'T00:00:00Z').getUTCDay()===1;
|
||||
if(monday||!dayPolicy(prior,schedule,overrides).send){
|
||||
{
|
||||
let found=false;
|
||||
for(let back=1;back<=370;back++){
|
||||
const previous=dayOf(new Date(+date-back*DAY));
|
||||
|
||||
Reference in new issue
Block a user