🏷️(frontend) adapt some types

Adapt some pad types.
This commit is contained in:
Anthony LC
2024-05-17 22:40:58 +02:00
committed by Anthony LC
parent a851720441
commit d75649d18a
2 changed files with 5 additions and 4 deletions

View File

@@ -17,9 +17,13 @@ export enum Role {
OWNER = 'owner',
}
export type Base64 = string;
export interface Pad {
id: string;
title: string;
content: Base64;
is_public: boolean;
accesses: Access[];
created_at: string;
updated_at: string;

View File

@@ -3,10 +3,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';
import { APIError, errorCauses, fetchAPI } from '@/api';
import { KEY_LIST_PAD, Pad } from '@/features/pads';
type CreatePadParam = {
title: string;
is_public: boolean;
};
type CreatePadParam = Pick<Pad, 'title' | 'is_public'>;
export const createPad = async ({
title,