mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
apply unique filter to getLocations api's (#17454)
* apply unique filter to getLocations api's * filter resource locations to distinct list * simplify location filter
This commit is contained in:
@@ -38,11 +38,11 @@ export async function getLocations(account: azdata.Account, subscription: Subscr
|
||||
if (response.errors.length > 0) {
|
||||
throw new Error(response.errors.toString());
|
||||
}
|
||||
sortResourceArrayByName(response.locations);
|
||||
|
||||
const filteredLocations = response.locations.filter(loc => {
|
||||
return sqlMigrationResourceLocations.includes(loc.displayName);
|
||||
});
|
||||
const filteredLocations = response.locations
|
||||
.filter(loc => sqlMigrationResourceLocations.includes(loc.displayName));
|
||||
|
||||
sortResourceArrayByName(filteredLocations);
|
||||
|
||||
return filteredLocations;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user