Hide Google Calendar API key in an external secrets file

This commit is contained in:
Adam Goldsmith 2021-04-01 14:00:51 -04:00
parent a252b61316
commit 71159a9a47
3 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/.cache/ /.cache/
/dist/ /dist/
/package-lock.json /package-lock.json
/src/secrets.json

View File

@ -14,6 +14,8 @@ import googleCalendarPlugin from '@fullcalendar/google-calendar';
import { EventInput, CalendarOptions } from '@fullcalendar/core'; import { EventInput, CalendarOptions } from '@fullcalendar/core';
import { Calendar } from '@fullcalendar/core'; import { Calendar } from '@fullcalendar/core';
import { googleCalendarApiKey } from './secrets.json';
const calendars: { [key: string]: string } = { const calendars: { [key: string]: string } = {
computer_lab: '6mmjp85e4732ru6skf1dda54ls@group.calendar.google.com', computer_lab: '6mmjp85e4732ru6skf1dda54ls@group.calendar.google.com',
electronics: '1g8atbdschshrg2inf162rcqt4@group.calendar.google.com', electronics: '1g8atbdschshrg2inf162rcqt4@group.calendar.google.com',
@ -37,7 +39,7 @@ export default class App extends Vue {
nowIndicator: true, nowIndicator: true,
initialView: 'timeGridWeek', initialView: 'timeGridWeek',
height: 'auto', height: 'auto',
googleCalendarApiKey: 'AIzaSyAQ46fgaqbekkmJqaKR0NCXntaJA6H8JoQ', googleCalendarApiKey,
slotMinTime: '8:00', slotMinTime: '8:00',
slotMaxTime: '22:00', slotMaxTime: '22:00',
businessHours: { businessHours: {

View File

@ -3,6 +3,7 @@
"target": "es5", "target": "es5",
"strict": true, "strict": true,
"module": "es2015", "module": "es2015",
"moduleResolution": "node" "moduleResolution": "node",
"resolveJsonModule": true
} }
} }