Merge pull request #397 from andlil/patch-4

Update queries.js
This commit is contained in:
Mike Cao 2020-12-01 13:12:09 -08:00 committed by GitHub
commit f596afc4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ export function getTimestampInterval(field) {
export async function getWebsiteById(website_id) {
return runQuery(
prisma.website.findOne({
prisma.website.findUnique({
where: {
website_id,
},
@ -78,7 +78,7 @@ export async function getWebsiteById(website_id) {
export async function getWebsiteByUuid(website_uuid) {
return runQuery(
prisma.website.findOne({
prisma.website.findUnique({
where: {
website_uuid,
},
@ -88,7 +88,7 @@ export async function getWebsiteByUuid(website_uuid) {
export async function getWebsiteByShareId(share_id) {
return runQuery(
prisma.website.findOne({
prisma.website.findUnique({
where: {
share_id,
},
@ -168,7 +168,7 @@ export async function createSession(website_id, data) {
export async function getSessionByUuid(session_uuid) {
return runQuery(
prisma.session.findOne({
prisma.session.findUnique({
where: {
session_uuid,
},
@ -225,7 +225,7 @@ export async function getAccounts() {
export async function getAccountById(user_id) {
return runQuery(
prisma.account.findOne({
prisma.account.findUnique({
where: {
user_id,
},
@ -235,7 +235,7 @@ export async function getAccountById(user_id) {
export async function getAccountByUsername(username) {
return runQuery(
prisma.account.findOne({
prisma.account.findUnique({
where: {
username,
},