mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
fix: missing nextId field for collection forms
This commit is contained in:
@@ -10,7 +10,7 @@ export const createCollectionValidator = vine.compile(
|
|||||||
name: vine.string().trim().minLength(1).maxLength(254),
|
name: vine.string().trim().minLength(1).maxLength(254),
|
||||||
description: vine.string().trim().maxLength(254).nullable(),
|
description: vine.string().trim().maxLength(254).nullable(),
|
||||||
visibility: vine.enum(Visibility),
|
visibility: vine.enum(Visibility),
|
||||||
nextId: vine.number(),
|
nextId: vine.number().optional(),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ export const updateCollectionValidator = vine.compile(
|
|||||||
name: vine.string().trim().minLength(1).maxLength(254),
|
name: vine.string().trim().minLength(1).maxLength(254),
|
||||||
description: vine.string().trim().maxLength(254).nullable(),
|
description: vine.string().trim().maxLength(254).nullable(),
|
||||||
visibility: vine.enum(Visibility),
|
visibility: vine.enum(Visibility),
|
||||||
nextId: vine.number(),
|
nextId: vine.number().optional(),
|
||||||
|
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Knex } from 'knex';
|
import { Knex } from 'knex';
|
||||||
|
|
||||||
export function defaultTableFields(table: Knex.CreateTableBuilder) {
|
export function defaultTableFields(table: Knex.CreateTableBuilder) {
|
||||||
table.increments('id', { primaryKey: true }).first().unique().notNullable();
|
table.increments('id').primary().first().unique().notNullable();
|
||||||
|
|
||||||
table.timestamp('created_at').notNullable();
|
table.timestamp('created_at').notNullable();
|
||||||
table.timestamp('updated_at').nullable();
|
table.timestamp('updated_at').nullable();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { resolvePageComponent } from '@adonisjs/inertia/helpers';
|
|||||||
import { createInertiaApp } from '@inertiajs/react';
|
import { createInertiaApp } from '@inertiajs/react';
|
||||||
import { hydrateRoot } from 'react-dom/client';
|
import { hydrateRoot } from 'react-dom/client';
|
||||||
import { primaryColor } from '~/styles/theme';
|
import { primaryColor } from '~/styles/theme';
|
||||||
|
import 'react-toggle/style.css';
|
||||||
|
|
||||||
import '../i18n/index';
|
import '../i18n/index';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export type FormCollectionData = {
|
|||||||
name: string;
|
name: string;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
visibility: Visibility;
|
visibility: Visibility;
|
||||||
nextId: Collection['id'];
|
nextId?: Collection['id'];
|
||||||
};
|
};
|
||||||
|
|
||||||
interface FormCollectionProps {
|
interface FormCollectionProps {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import Toggle from 'react-toggle';
|
import Toggle from 'react-toggle';
|
||||||
import 'react-toggle/style.css';
|
|
||||||
import useDarkTheme from '~/hooks/use_dark_theme';
|
import useDarkTheme from '~/hooks/use_dark_theme';
|
||||||
|
|
||||||
export default function ThemeSwitcher() {
|
export default function ThemeSwitcher() {
|
||||||
|
|||||||
Reference in New Issue
Block a user