mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
fix typescript
This commit is contained in:
1 parent
0109bd8963
commit
57d7c6b6b8
4 files changed
+6
-6
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { CollectionConfig } from 'payload/types'
|
||||
import { CollectionConfig } from 'payload'
|
||||
|
||||
const Author: CollectionConfig = {
|
||||
slug: 'authors',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CollectionConfig } from 'payload/types'
|
||||
import { CollectionConfig } from 'payload'
|
||||
|
||||
const BlogPost: CollectionConfig = {
|
||||
slug: 'blog-posts',
|
||||
@@ -22,9 +22,9 @@ const BlogPost: CollectionConfig = {
|
||||
admin: {
|
||||
position: 'sidebar',
|
||||
},
|
||||
validate: (value) => {
|
||||
validate: (value: string | string[] | null | undefined) => {
|
||||
const regex = /^[a-z][a-z0-9-]{2,49}$/
|
||||
if (!regex.test(value)) {
|
||||
if (!regex.test(value as string)) {
|
||||
return 'Slug must start with a letter, contain only lowercase letters, numbers, and hyphens, and be between 3-50 characters'
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CollectionConfig } from 'payload/types'
|
||||
import { CollectionConfig } from 'payload'
|
||||
|
||||
const Category: CollectionConfig = {
|
||||
slug: 'categories',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CollectionConfig } from 'payload/types'
|
||||
import { CollectionConfig } from 'payload'
|
||||
|
||||
const Tag: CollectionConfig = {
|
||||
slug: 'tags',
|
||||
|
||||
Reference in new issue
Block a user