fix: Add missing await when refetching region (#9283)
FIXES #9280 FIXES #9277
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user