Project restructuring, fixing minor bugs related to vue CLI upgrade
* Removed PWA kit from project, this removes a ton of dependencies
This commit is contained in:
@@ -2,10 +2,10 @@ let db = require('@config/database')
|
||||
|
||||
let Note = require('@models/Note')
|
||||
|
||||
let CycleTracking = module.exports = {}
|
||||
let MetricTracking = module.exports = {}
|
||||
|
||||
|
||||
CycleTracking.get = (userId, masterKey) => {
|
||||
MetricTracking.get = (userId, masterKey) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
db.promise()
|
||||
@@ -25,7 +25,7 @@ CycleTracking.get = (userId, masterKey) => {
|
||||
} else {
|
||||
//Or create a new note
|
||||
let finalId = null
|
||||
return Note.create(userId, 'Cycle Tracking', '', masterKey)
|
||||
return Note.create(userId, 'Metric Tracking', '', masterKey)
|
||||
.then(insertedId => {
|
||||
finalId = insertedId
|
||||
db.promise().query('UPDATE note SET quick_note = 2 WHERE id = ? AND user_id = ?',[insertedId, userId])
|
||||
@@ -47,12 +47,12 @@ CycleTracking.get = (userId, masterKey) => {
|
||||
})
|
||||
}
|
||||
|
||||
CycleTracking.save = (userId, cycleData, masterKey) => {
|
||||
MetricTracking.save = (userId, cycleData, masterKey) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
let finalId = null
|
||||
|
||||
CycleTracking.get(userId, masterKey)
|
||||
MetricTracking.get(userId, masterKey)
|
||||
.then(noteObject => {
|
||||
|
||||
return Note.update(userId, noteObject.id, cycleData, noteObject.title, noteObject.color, noteObject.pinned, noteObject.archived, null, masterKey)
|
Reference in New Issue
Block a user