add,update -> set

This commit is contained in:
AJ ONeal 2019-10-31 16:25:43 -06:00
parent 2a881d9edb
commit 8c8d9251cd
1 changed files with 6 additions and 9 deletions

View File

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