Created the text module

This commit is contained in:
2023-01-08 03:33:45 +01:00
parent 8cdf6fca6c
commit b45d6944e5
2 changed files with 58 additions and 0 deletions

26
modules/text/module.js Normal file
View File

@ -0,0 +1,26 @@
const Joi = require("joi");
const {getLinkById} = require("../../server/controller/link");
module.exports.onClick = async (id, accessId, metaData, controller) => {
controller.locals.meta.title = (await getLinkById(id)).title;
controller.render(__dirname + "/web/index");
}
module.exports.info = {
name: "Link mit Text",
icon: "clipboard",
validationSchema: Joi.object({
content: Joi.string().required(),
}),
meta: [{
name: "Link-Einstellungen",
type: "default",
fields: {
content: {
type: "text",
name: "Dein Text",
description: "Der anzuzeigende Text"
}
}
}]
}