refactor(app/web): new features (#1124) [skip ci]
This commit is contained in:
6
.github/scripts/quickstart/plugin/index.mjs
vendored
6
.github/scripts/quickstart/plugin/index.mjs
vendored
@@ -1,15 +1,15 @@
|
||||
//Setup
|
||||
export default async function({login, q, imports, data, computed, rest, graphql, queries, account}, {enabled = false} = {}) {
|
||||
export default async function({login, q, imports, data, computed, rest, graphql, queries, account}, {enabled = false, extras = false} = {}) {
|
||||
//Plugin execution
|
||||
try {
|
||||
//Check if plugin is enabled and requirements are met
|
||||
if ((!enabled)||(!q.<%= name %>))
|
||||
if ((!enabled) || (!q.<%= name %>) || (!imports.metadata.plugins.<%= name %>.extras("enabled", {extras})))
|
||||
return null
|
||||
//Results
|
||||
return {}
|
||||
}
|
||||
//Handle errors
|
||||
catch (error) {
|
||||
throw {error:{message:"An error occured", instance:error}}
|
||||
throw imports.format.error(error)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user