Skip to content

Commit

Permalink
Move access to .env to top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
KjartanE committed Jan 7, 2022
1 parent cd020d2 commit 38e4653
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/paths/gcnotify/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { IgcNotifyPostReturn, IgcNotifyConfig } from '../../models/gcnotify';

const defaultLog = getLogger('paths/gcnotify');

const api_key = process.env.GCNOTIFY_SECRET_API_KEY;

export const POST: Operation = [
authorizeRequestHandler(() => {
return {
Expand Down Expand Up @@ -149,7 +151,6 @@ export function sendNotification(): RequestHandler {
const gcnotifyService = new GCNotifyService();
let response = {} as IgcNotifyPostReturn;

const api_key = process.env.GCNOTIFY_SECRET_API_KEY;
const config = {
headers: {
Authorization: api_key,
Expand Down

0 comments on commit 38e4653

Please sign in to comment.