1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-10-01 09:00:12 +02:00
pingvin-share/.setup/data/functions.ts

54 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-04-25 15:15:17 +02:00
export default () => {
const host = process.env["APPWRITE_HOST"].replace(
"localhost",
"host.docker.internal"
);
return [
{
$id: "createShare",
execute: ["role:all"],
name: "Create Share",
runtime: "node-16.0",
vars: {
APPWRITE_FUNCTION_ENDPOINT: host,
APPWRITE_FUNCTION_API_KEY: process.env["APPWRITE_FUNCTION_API_KEY"],
2022-05-12 16:25:34 +02:00
SMTP_HOST: "-",
SMTP_PORT: "-",
SMTP_USER: "-",
SMTP_PASSWORD: "-",
SMTP_FROM: "-",
FRONTEND_URL: "-",
2022-04-25 15:15:17 +02:00
},
events: [],
schedule: "",
timeout: 15,
},
{
$id: "finishShare",
execute: ["role:all"],
name: "Finish Share",
runtime: "node-16.0",
vars: {
APPWRITE_FUNCTION_ENDPOINT: host,
APPWRITE_FUNCTION_API_KEY: process.env["APPWRITE_FUNCTION_API_KEY"],
},
events: [],
schedule: "",
timeout: 15,
},
{
$id: "cleanShares",
2022-04-28 16:48:19 +02:00
execute: [],
2022-04-25 15:15:17 +02:00
name: "Clean Shares",
runtime: "node-16.0",
2022-04-28 16:48:19 +02:00
vars: {
APPWRITE_FUNCTION_ENDPOINT: host,
APPWRITE_FUNCTION_API_KEY: process.env["APPWRITE_FUNCTION_API_KEY"],
},
2022-04-25 15:15:17 +02:00
events: [],
2022-05-18 12:35:07 +02:00
schedule: "00 * * * *",
2022-04-25 15:15:17 +02:00
timeout: 60,
},
];
};