add,update -> set

This commit is contained in:
AJ ONeal 2019-10-31 16:25:43 -06:00
父節點 2a881d9edb
當前提交 8c8d9251cd
共有 1 個檔案被更改,包括 6 行新增9 行删除

查看文件

@ -329,8 +329,7 @@ Greenlock.create({
The manager itself is, again relatively simple: The manager itself is, again relatively simple:
- find(options) - find(options)
- add(siteConfig) - set(siteConfig)
- update(updates)
- remove(options) - remove(options)
- defaults(globalOptions) (as setter) - defaults(globalOptions) (as setter)
- defaults() => globalOptions (as getter) - defaults() => globalOptions (as getter)
@ -360,13 +359,11 @@ module.exports.create = function() {
return []; return [];
}; };
manage.add = function({ subject, altnames }) { manage.set = function(opts) {
return setSiteConfig(subject, { subject, altnames }); // this is called by greenlock.add({ subject, altnames })
}; // it's also called by greenlock._update({ subject, renewAt })
manage.update = function({ subject, renewAt }) { return mergSiteConfig(subject, opts);
// update the `renewAt` date of the site by `subject`
return mergSiteConfig(subject, { renewAt });
}; };
manage.remove = function({ subject, altname }) { manage.remove = function({ subject, altname }) {