un-verify in buildings table too

This commit is contained in:
Ed Chalstrey 2022-05-05 13:23:49 +01:00
parent 63c190c981
commit 7a0228bed1

View File

@ -106,6 +106,15 @@ export async function removeBuildingUserVerifiedAttribute(buildingId: number, us
`, `,
[buildingId, userId, attribute] [buildingId, userId, attribute]
); );
if (attribute == 'current_landuse_group'){
await (db).none(
`UPDATE buildings
SET current_landuse_verified = FALSE
WHERE buildings.building_id = $1;"
`,
[buildingId]
);
}
} catch(error) { } catch(error) {
throw new DatabaseError(error.detail); throw new DatabaseError(error.detail);
} }