fix: Add missing await when refetching region (#9283)

FIXES #9280 
FIXES #9277
This commit is contained in:
Stevche Radevski
2024-09-24 14:28:12 +00:00
committed by GitHub
parent 90d530565b
commit bb342d46f6
2 changed files with 5 additions and 3 deletions
@@ -35,7 +35,7 @@ export const POST = async (
req: AuthenticatedMedusaRequest<AdminUpdateRegionType>,
res: MedusaResponse<HttpTypes.AdminRegionResponse>
) => {
const existingRegion = refetchRegion(req.params.id, req.scope, ["id"])
const existingRegion = await refetchRegion(req.params.id, req.scope, ["id"])
if (!existingRegion) {
throw new MedusaError(
MedusaError.Types.NOT_FOUND,