Skip to content

Commit 632c8d3

Browse files
Add timestamp to app creation dates
1 parent b569caf commit 632c8d3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

electron/routes/dashboard.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ipcMain, IpcMainEvent } from 'electron';
2+
import moment from 'moment';
23
import path from 'path';
34
import fs from 'fs';
45
/**
@@ -15,6 +16,12 @@ ipcMain.on('addApp', (message: IpcMainEvent, application: any) => {
1516

1617
// Add new applicaiton to list
1718
const newApp = JSON.parse(application);
19+
20+
// Add a creation date to the application
21+
const createdOn = moment().format('lll')
22+
newApp.push(createdOn)
23+
24+
// Add app to list of applications
1825
state.services.push(newApp);
1926

2027
// Update settings.json with new list

0 commit comments

Comments
 (0)