HH-803: add stable network exit orchestration (#19)
This commit is contained in:
@@ -21,6 +21,8 @@ const resourcePaths = {
|
||||
browsers: '/browsers',
|
||||
'browser-images': '/browser-images',
|
||||
gateways: '/gateways',
|
||||
accounts: '/phase-a/accounts',
|
||||
'network-exits': '/network-exits',
|
||||
}
|
||||
|
||||
export const dataProvider = {
|
||||
@@ -28,7 +30,7 @@ export const dataProvider = {
|
||||
const path = resourcePaths[resource]
|
||||
if (!path) return unsupported(resource, 'getList')
|
||||
const records = await request(path)
|
||||
return { data: records.map(record => ({ ...record, id: record.alias ?? record.version ?? record.name })), total: records.length }
|
||||
return { data: records.map(record => ({ ...record, id: record.id ?? record.alias ?? record.version ?? record.name })), total: records.length }
|
||||
},
|
||||
async create(resource, { data }) {
|
||||
const path = resourcePaths[resource]
|
||||
|
||||
Reference in New Issue
Block a user