respond to articleMutations within js for android calls only

This commit is contained in:
Satindar Dhillon
2022-12-05 20:10:42 -08:00
parent 643ba33bfd
commit 99ec98095e
3 changed files with 25 additions and 3 deletions

View File

@ -23,7 +23,29 @@ const mutation = async (name, input) => {
name,
JSON.stringify(input)
)
return true // TODO: see if we can get a result from Android instead
// TODO: handle errors
switch (name) {
case 'createHighlight':
return input
case 'deleteHighlight':
return true
case 'mergeHighlight':
return {
id: input['id'],
shortID: input['shortId'],
quote: input['quote'],
patch: input['patch'],
createdByMe: true,
labels: [],
}
case 'updateHighlight':
return true
case 'articleReadingProgress':
return true
default:
return true
}
}
}