add,update -> set
This commit is contained in:
parent
2a881d9edb
commit
8c8d9251cd
|
@ -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 }) {
|
||||||
|
|
Loading…
Reference in New Issue