Closed PaoGon closed 1 year ago
Sige sige paps, tinry ko last time ivalidate din kasama location, may nakukuha akong error nun last time, pero need ko lang imbestigahan mabuti
patingin ako ng error na nakukuha mo, ss mo dito
eto pala
const isReport = await ctx.prisma.report.findFirst({
where : {
AND: [
{description: args.data.description},
{report_type: args.data.report_type},
]
}
})
if (isReport) {
throw new ApolloError("Report Already Exist")
}
Originally posted by @jlozion026 in https://github.com/PaoGon/thesis/issues/63#issuecomment-1384757096
eto pala
const isReport = await ctx.prisma.report.findFirst({ where : { AND: [ {description: args.data.description}, {report_type: args.data.report_type}, ] } }) if (isReport) { throw new ApolloError("Report Already Exist") }
Originally posted by @jlozion026 in #63 (comment)
di ba na gana dito yung
where : {
AND: [
{description: args.data.description},
{report_type: args.data.report_type},
{report_type: args.data.location},
]
}
@jlozion026
Ayan, ganyan yung ginawa ko nooon HAHAHAH
Ayan, ganyan yung ginawa ko nooon HAHAHAH
hmmm, possible kasi na di nya ala myung type ng location since json yung type nyan kaya nag error pero patingin narin ng error message
How to replicate
reportType
anddescription
but different place it will throw an error that report is already existingexpected behavior:
suggestion: