set buildings table to current_landuse_group = True when verify clicked
This commit is contained in:
parent
aa138198d8
commit
63c190c981
@ -74,6 +74,15 @@ export async function updateBuildingUserVerifiedAttribute(buildingId: number, us
|
||||
[buildingId, userId, attribute, value]
|
||||
);
|
||||
}
|
||||
if (attribute == 'current_landuse_group'){
|
||||
await (db).none(
|
||||
`UPDATE buildings
|
||||
SET current_landuse_verified = TRUE
|
||||
WHERE buildings.building_id = $1;"
|
||||
`,
|
||||
[buildingId]
|
||||
);
|
||||
}
|
||||
} catch(error) {
|
||||
console.error(error)
|
||||
if(error.detail?.includes('already exists')) {
|
||||
|
Loading…
Reference in New Issue
Block a user