total restructure: isolate functionality to core so web works
This commit is contained in:
25
src/core/IpcAdapter.js
Normal file
25
src/core/IpcAdapter.js
Normal file
@@ -0,0 +1,25 @@
|
||||
export default class IpcAdapter {
|
||||
constructor() {
|
||||
this._methods = ['init', 'getAll', 'create', 'update', 'delete']
|
||||
}
|
||||
|
||||
async init() {
|
||||
return await window.adapter.call('init')
|
||||
}
|
||||
|
||||
async getAll() {
|
||||
return await window.adapter.call('getAll')
|
||||
}
|
||||
|
||||
async create(note) {
|
||||
return await window.adapter.call('create', note)
|
||||
}
|
||||
|
||||
async update(note) {
|
||||
return await window.adapter.call('update', note)
|
||||
}
|
||||
|
||||
async delete(id) {
|
||||
return await window.adapter.call('delete', id)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user