body = {
"_id": "ZX7c062wq",
"name": "test2",
"data_type": "STRING",
"mode": "LOCAL",
"default" : "test",
"state": "ACTIVE",
"workspace_id": "work",
"asset_id" : "q-GmTD5-K",
"parent_id" : "q-GmTD5-K",
"env":{
"default": "test1"
}
}
await variable_instance.save(body)
parent_id = "q-GmTD5-K"
asset_cache_obj = {
"_id": "test@gofo.app|ZzBfJMpfQ",
"user_id": "test@gofo.app",
"workspace_id": "ZzBfJMpfQ",
"workspace": {
"_id": "ZzBfJMpfQ",
"name": "test"
},
"user": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
"email_id": "test@gofo.app"
},
"folders": [
{
"_id": "q-GmTD5-K",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
},
"is_favorite": false,
"childs": [
{
"_id": "MyTbZOnfH",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
},
"is_favorite": false
}
]
}
],
"files": [
{
"_id": "q-GmTD5-K",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test"
},
"is_favorite": false,
"childs": [
{
"_id": "MyTbZOnfH",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
},
"is_favorite": false
}
]
}
],
"recent": [],
"recommendation": [],
"shared": [],
"favourites": [],
"trash": [],
"checksum": "68fe37b0-9101-49e8-b8b7-35e7c89b0759",
"created_at": "2023-07-11T18:25:53.863Z",
"updated_at": "2023-07-12T11:20:44.818Z"
}
await a.getByParent(parent_id, asset_cache_obj)