Skip to content

Commit

Permalink
fix: remove municipality_full_name
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro committed Jan 30, 2024
1 parent f64ab00 commit 95e73fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `municipality_full_name` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "municipality_full_name";
1 change: 0 additions & 1 deletion api-node/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ model User {
appdevice String?
municipality_insee_code String? // code INSEE
municipality_name String?
municipality_full_name String?
municipality_zip_code String?
push_notif_token String?
created_at DateTime @default(now())
Expand Down
4 changes: 0 additions & 4 deletions api-node/src/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ router.put(
z.object({
municipality_insee_code: z.string().optional(),
municipality_name: z.string().optional(),
municipality_full_name: z.string().optional(),
municipality_zip_code: z.string().optional(),
push_notif_token: z.string().optional(),
favorite_indicator: z.string().optional(),
Expand Down Expand Up @@ -83,9 +82,6 @@ router.put(
if (bodyHasProperty('municipality_name')) {
updatedUser.municipality_name = req.body.municipality_name;
}
if (bodyHasProperty('municipality_full_name')) {
updatedUser.municipality_full_name = req.body.municipality_full_name;
}
if (bodyHasProperty('municipality_zip_code')) {
updatedUser.municipality_zip_code = req.body.municipality_zip_code;
}
Expand Down

0 comments on commit 95e73fe

Please sign in to comment.