Answer the question
In order to leave comments, you need to log in
How to properly organize settings for subdomains?
There is:
id | name | value | site_id | lang_id | autoload | type
Answer the question
In order to leave comments, you need to log in
more or less like this:
async function f() {
let payload = {};
let schedule = await parser();
payload.message = schedule[0].date;
return payload;
}
// использование
f().then((payload) => {
console.log(payload);
});
I recently had a very similar problem, but not about settings and subdomains, but about the schedule for turning on / off street lighting in cities and city districts (you can see my questions).
I came up with this solution (in terms of your task):
I like this scheme because the newly created domain inherits settings from its "parents" without new entries in the Assignment table . But at the same time, nothing prevents you from explicitly customizing the settings for this domain by adding entries to the Assignment table . The external code first looks in the Assignment for the settings for this domain, if they are not there, then the settings of the parents will be applied.
I would like to hear criticism of this version of the scheme, since it is my invention (probably not unique) and I am not completely sure of it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question