Skip to content

Commit

Permalink
Domain field added
Browse files Browse the repository at this point in the history
  • Loading branch information
Princerey committed May 23, 2024
1 parent 66966be commit f8f6d43
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 28 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"private": true,
"type": "module",
"dependencies": {
"@prisma/client": "^4.16.2",
"@prisma/client": "^5.13.0",
"axios": "^1.3.4",
"bcrypt": "^5.1.0",
"cors": "^2.8.5",
Expand All @@ -22,7 +22,7 @@
},
"devDependencies": {
"nodemon": "^2.0.21",
"prisma": "^5.6.0"
"prisma": "^5.13.0"
},
"scripts": {
"dev": "nodemon src/app",
Expand Down
2 changes: 2 additions & 0 deletions prisma/migrations/20240522055638_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Profile" ADD COLUMN "domain" TEXT;
1 change: 1 addition & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ model Profile {
avatar String?
twitter_username String?
linkedin_url String?
domain String?
userId String @unique
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
Expand Down
15 changes: 10 additions & 5 deletions src/app/user/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const createUser = (data) => {
username: data.profile.username,
graduation_year: data.profile.graduation_year,
linkedin_url: data.profile.linkedin_url,
twitter_username: data.profile.twitter_username
twitter_username: data.profile.twitter_username,
domain : data.profile.domain
}
}
}
Expand Down Expand Up @@ -53,7 +54,8 @@ export const getUserById = (userId) => {
avatar: true,
graduation_year: true,
linkedin_url: true,
twitter_username: true
twitter_username: true,
domain :true
}
}
}
Expand All @@ -73,7 +75,8 @@ export const getListOfMembers = () => {
linkedin_url: true,
name: true,
twitter_username: true,
username: true
username: true,
domain :true
}
}
}
Expand All @@ -92,7 +95,8 @@ export const updateProfileById = async (userId, data) => {
avatar: true,
graduation_year: true,
linkedin_url: true,
twitter_username: true
twitter_username: true,
domain: true
}
})
}
Expand All @@ -117,7 +121,8 @@ export const getMemberProfileByUsername = async (username) => {
avatar: true,
graduation_year: true,
linkedin_url: true,
twitter_username: true
twitter_username: true,
domain:true
}
})
}
66 changes: 45 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -418,22 +418,46 @@
semver "^7.3.5"
tar "^6.1.11"

"@prisma/client@^4.16.2":
version "4.16.2"
resolved "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz"
integrity sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==
dependencies:
"@prisma/engines-version" "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81"

"@prisma/engines-version@4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81":
version "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81"
resolved "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz"
integrity sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==

"@prisma/[email protected]":
version "5.6.0"
resolved "https://registry.npmjs.org/@prisma/engines/-/engines-5.6.0.tgz"
integrity sha512-Mt2q+GNJpU2vFn6kif24oRSBQv1KOkYaterQsi0k2/lA+dLvhRX6Lm26gon6PYHwUM8/h8KRgXIUMU0PCLB6bw==
"@prisma/client@^5.13.0":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.13.0.tgz#b9f1d0983d714e982675201d8222a9ecb4bdad4a"
integrity sha512-uYdfpPncbZ/syJyiYBwGZS8Gt1PTNoErNYMuqHDa2r30rNSFtgTA/LXsSk55R7pdRTMi5pHkeP9B14K6nHmwkg==

"@prisma/[email protected]":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.13.0.tgz#d88b0f6fafa0c216e20e284ed9fc30f1cbe45786"
integrity sha512-699iqlEvzyCj9ETrXhs8o8wQc/eVW+FigSsHpiskSFydhjVuwTJEfj/nIYqTaWFYuxiWQRfm3r01meuW97SZaQ==

"@prisma/engines-version@5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b":
version "5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b.tgz#a72a4fb83ba1fd01ad45f795aa55168f60d34723"
integrity sha512-AyUuhahTINGn8auyqYdmxsN+qn0mw3eg+uhkp8zwknXYIqoT3bChG4RqNY/nfDkPvzWAPBa9mrDyBeOnWSgO6A==

"@prisma/[email protected]":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.13.0.tgz#8994ebf7b4e35aee7746a8465ec22738379bcab6"
integrity sha512-hIFLm4H1boj6CBZx55P4xKby9jgDTeDG0Jj3iXtwaaHmlD5JmiDkZhh8+DYWkTGchu+rRF36AVROLnk0oaqhHw==
dependencies:
"@prisma/debug" "5.13.0"
"@prisma/engines-version" "5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b"
"@prisma/fetch-engine" "5.13.0"
"@prisma/get-platform" "5.13.0"

"@prisma/[email protected]":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.13.0.tgz#9b6945c7b38bb59e840f8905b20ea7a3d059ca55"
integrity sha512-Yh4W+t6YKyqgcSEB3odBXt7QyVSm0OQlBSldQF2SNXtmOgMX8D7PF/fvH6E6qBCpjB/yeJLy/FfwfFijoHI6sA==
dependencies:
"@prisma/debug" "5.13.0"
"@prisma/engines-version" "5.13.0-23.b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b"
"@prisma/get-platform" "5.13.0"

"@prisma/[email protected]":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.13.0.tgz#99ef909a52b9d79b64d72d2d3d8210c4892b6572"
integrity sha512-B/WrQwYTzwr7qCLifQzYOmQhZcFmIFhR81xC45gweInSUn2hTEbfKUPd2keAog+y5WI5xLAFNJ3wkXplvSVkSw==
dependencies:
"@prisma/debug" "5.13.0"

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down Expand Up @@ -1472,12 +1496,12 @@ picomatch@^2.0.4, picomatch@^2.2.1:
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

prisma@^5.6.0:
version "5.6.0"
resolved "https://registry.npmjs.org/prisma/-/prisma-5.6.0.tgz"
integrity sha512-EEaccku4ZGshdr2cthYHhf7iyvCcXqwJDvnoQRAJg5ge2Tzpv0e2BaMCp+CbbDUwoVTzwgOap9Zp+d4jFa2O9A==
prisma@^5.13.0:
version "5.13.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.13.0.tgz#1f06e20ccfb6038ad68869e6eacd3b346f9d0851"
integrity sha512-kGtcJaElNRAdAGsCNykFSZ7dBKpL14Cbs+VaQ8cECxQlRPDjBlMHNFYeYt0SKovAVy2Y65JXQwB3A5+zIQwnTg==
dependencies:
"@prisma/engines" "5.6.0"
"@prisma/engines" "5.13.0"

process-nextick-args@~2.0.0:
version "2.0.1"
Expand Down

0 comments on commit f8f6d43

Please sign in to comment.