UNPKG

appwrite-server-wrapper

Version:

Wrapper library to handle Appwrite methods including server handling using SSR with NextJS v15 (useActionState, useAction,...)

19 lines (18 loc) 478 B
import { handleApwError } from "../exceptions"; import { createRealtimeSessionClient } from "../appwriteClients"; /** * Creates a new storage bucket. */ const createRealtime = async () => { try { const { client } = await createRealtimeSessionClient(); return { data: client, error: null }; } catch (error) { return { data: null, error: await handleApwError({ error }), }; } }; export { createRealtime };