[javascript] Fixed database functions result which were not parsed
This commit is contained in:
parent
f89af1145d
commit
a9cd987c50
3 changed files with 4 additions and 3 deletions
|
@ -12,5 +12,5 @@ export function getAgent() {
|
|||
if (data === undefined) {
|
||||
return null;
|
||||
}
|
||||
return data.data;
|
||||
return JSON.parse(data.data);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ export function getContract(id) {
|
|||
if (data === undefined) {
|
||||
return null;
|
||||
}
|
||||
return data.data;
|
||||
return JSON.parse(data.data);
|
||||
}
|
||||
|
||||
export function setContract(data) {
|
||||
|
|
|
@ -10,7 +10,8 @@ export function deleteExpired() {
|
|||
|
||||
export function get(symbol) {
|
||||
deleteExpired();
|
||||
return getSurveysStatement.all(symbol);
|
||||
const data = getSurveysStatement.all(symbol);
|
||||
return data.map(elt => JSON.parse(elt.data));
|
||||
}
|
||||
|
||||
export function set(survey) {
|
||||
|
|
Loading…
Add table
Reference in a new issue