- Service Worker: Save on IndexDb and Sync to send after to the DB.
- Insert record on MongoDb, POST, GET.
This commit is contained in:
@@ -6,13 +6,16 @@ export default ({ Vue }) => {
|
||||
|
||||
// Insert here the database for IndexDB
|
||||
new VueIdb({
|
||||
database: 'test',
|
||||
database: 'mydb',
|
||||
version: 1,
|
||||
schemas: [
|
||||
{ categories: '++id, sub_categ_id, descr_it, campo2bool, campo3bool' },
|
||||
{ todos: '++id, userId, category, pos, descr, priority, completed, created_at, modify_at, expiring_at, progress, enableExpiring' }
|
||||
{ categories: '++_id, sub_categ_id, descr_it, campo2bool, campo3bool' },
|
||||
{ todos: '++_id, userId, category, pos, descr, priority, completed, created_at, modify_at, completed_at, expiring_at, progress, enableExpiring' },
|
||||
{ sync_todos: '++_id, userId, category, pos, descr, priority, completed, created_at, modify_at, completed_at, expiring_at, progress, enableExpiring' }
|
||||
],
|
||||
options: {
|
||||
todos: { type: 'list', primary: 'pos', label: 'label', updated_at: 'updated_at' },
|
||||
sync_todos: { type: 'list', primary: 'pos', label: 'label', updated_at: 'updated_at' },
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -25,7 +28,7 @@ export default new VueIdb({
|
||||
version: 1,
|
||||
database: 'test',
|
||||
schemas: [
|
||||
{ categories: '++id, sub_categ_id, descr_it' }
|
||||
{ categories: '++_id, sub_categ_id, descr_it' }
|
||||
]
|
||||
})
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user