Redwood v0.37 updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { UserInputError } from '@redwoodjs/graphql-server'
|
||||
import { db } from 'src/lib/db'
|
||||
import { UserInputError } from '@redwoodjs/api'
|
||||
|
||||
const validate = (input) => {
|
||||
if (input.email && !input.email.match(/[^@]+@[^.]+\..+/)) {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
export const standard = defineScenario({
|
||||
contact: {
|
||||
john: {
|
||||
name: 'John Doe',
|
||||
email: 'john.doe@example.com',
|
||||
message: 'I love RedwoodJS',
|
||||
data: {
|
||||
name: 'John Doe',
|
||||
email: 'john.doe@example.com',
|
||||
message: 'I love RedwoodJS',
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import { db } from 'src/lib/db'
|
||||
import { requireAuth } from 'src/lib/auth'
|
||||
|
||||
// Used when the environment variable REDWOOD_SECURE_SERVICES=1
|
||||
export const beforeResolver = (rules) => {
|
||||
rules.add(requireAuth)
|
||||
}
|
||||
|
||||
export const posts = () => {
|
||||
return db.post.findMany()
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
export const standard = defineScenario({
|
||||
post: {
|
||||
one: { title: 'String', body: 'String' },
|
||||
two: { title: 'String', body: 'String' },
|
||||
one: {
|
||||
data: { title: 'String', body: 'String' }
|
||||
},
|
||||
two: {
|
||||
data: { title: 'String', body: 'String' }
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user