Skip to content

Commit

Permalink
Clean up index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
one23four56 committed May 1, 2021
1 parent ac1fa71 commit 17b61e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import express = require('express');
import fetch from 'node-fetch';
import { Body } from './github-format';
import * as gformat from './gchat-format';
import { wrap } from 'node:module';
const app = express();

const generateMessage = (body: Body, event: string) => {
Expand Down Expand Up @@ -121,7 +120,7 @@ const generateMessage = (body: Body, event: string) => {
app.use(express.json())

app.post('/', async (req, res)=>{
try { //https://chat.googleapis.com/v1/spaces/AAAAb3i9pAw/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=kOSjPJdKYaXr4RMY-mmNltGHCs4B2ZMovxQ7yX9V_WY%3D
try {
if (!req.query.url) throw `Please specify a URL to send to`;
const url: string = `${req.query.url as string}&token=${req.query.token}`
const tstping = await fetch(url)
Expand Down

0 comments on commit 17b61e4

Please sign in to comment.