greenlock.manager.remove({subject}) doesn't work #56

開放中
建立於 2021-03-17 14:13:41 +00:00 由 Ghost · 0 comment

greenlock.manager.remove({subject}) doesn't work, it never finds a site by subject`.

npx greenlock remove --subject has the same problem.

I've tried debugging and this is what I came up with:

In
https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/manager-wrapper.js#L203
the public manager api is exposed. The remove function expects {subject}, it checks and refuses to take servername or altname.
The remove function in the wrapper calls the merged remove function, which calls mega.get:
https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/manager-wrapper.js#L475
The opts to mega.remove at this time are {subject}.

mega.get however, uses {servername, wildname}.

A workaround is to use
greenlock.manager.set({subject, deletedAt: Date.now()})

`greenlock.manager.remove({subject}) doesn't work, it never finds a site by `subject`. `npx greenlock remove --subject` has the same problem. I've tried debugging and this is what I came up with: In https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/manager-wrapper.js#L203 the public manager api is exposed. The remove function expects {subject}, it checks and refuses to take `servername` or `altname`. The remove function in the wrapper calls the merged `remove` function, which calls `mega.get`: https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/manager-wrapper.js#L475 The opts to `mega.remove` at this time are `{subject}`. `mega.get` however, uses `{servername, wildname}`. A workaround is to use `greenlock.manager.set({subject, deletedAt: Date.now()})`
登入 才能加入這對話。
未選擇標籤
未選擇里程碑
沒有負責人
1 參與者
通知
截止日期
截止日期無效或超出範圍,請使用「yyyy-mm-dd」的格式。

未設定截止日期。

先決條件

未設定先決條件。

參考: coolaj86/greenlock.js-ARCHIVED#56
No description provided.