feat(db): 🗃️ Add createdAt and updatedAt
This commit is contained in:
@ -24,7 +24,7 @@ export const useCredentials = ({
|
||||
|
||||
export const createCredentials = async (
|
||||
userId: string,
|
||||
credentials: Omit<Credentials, 'ownerId' | 'id' | 'iv'>
|
||||
credentials: Omit<Credentials, 'ownerId' | 'id' | 'iv' | 'createdAt'>
|
||||
) =>
|
||||
sendRequest<{
|
||||
credentials: Credentials
|
||||
|
@ -12,7 +12,7 @@ export const useCustomDomains = ({
|
||||
onError: (error: Error) => void
|
||||
}) => {
|
||||
const { data, error, mutate } = useSWR<
|
||||
{ customDomains: CustomDomain[] },
|
||||
{ customDomains: Omit<CustomDomain, 'createdAt'>[] },
|
||||
Error
|
||||
>(userId ? `/api/users/${userId}/customDomains` : null, fetcher)
|
||||
if (error) onError(error)
|
||||
@ -25,7 +25,7 @@ export const useCustomDomains = ({
|
||||
|
||||
export const createCustomDomain = async (
|
||||
userId: string,
|
||||
customDomain: Omit<CustomDomain, 'ownerId'>
|
||||
customDomain: Omit<CustomDomain, 'ownerId' | 'createdAt'>
|
||||
) =>
|
||||
sendRequest<{
|
||||
credentials: Credentials
|
||||
|
Reference in New Issue
Block a user