mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
remove mail trigger
This commit is contained in:
12
.github/workflows/mailtrigger.yaml
vendored
12
.github/workflows/mailtrigger.yaml
vendored
@@ -1,12 +0,0 @@
|
|||||||
name: mailtrigger
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '*/15 * * * *'
|
|
||||||
jobs:
|
|
||||||
cron:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Call API route
|
|
||||||
run: |
|
|
||||||
curl --url 'https://pfadi-bussle-dev.tomru.space/api/mailtrigger'
|
|
||||||
curl --url 'https://pfadi-bussle.tomru.space/api/mailtrigger'
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import { log } from '../../helpers/log'
|
|
||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
|
||||||
|
|
||||||
export default async function useHandler(
|
|
||||||
req: NextApiRequest,
|
|
||||||
res: NextApiResponse
|
|
||||||
): Promise<void> {
|
|
||||||
const { method } = req
|
|
||||||
|
|
||||||
switch (method) {
|
|
||||||
case 'GET':
|
|
||||||
log.info('sending mail triggered')
|
|
||||||
res.status(200).end('DONE')
|
|
||||||
res.end()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
res.setHeader('Allow', ['GET'])
|
|
||||||
res.status(405).end(`Method ${method} Not Allowed`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user