diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -32,7 +32,7 @@
> => { + const rpc = createClient(agent); + const { uri, cid } = await ok( + rpc.call(putRecordSchema, { + input: { + repo: agent.sub, + collection: REACTION_COLLECTION, + rkey: rkey as RecordKey, + record + } + }) + ); + return { uri, cid, value: record }; +}; + +export const deleteReaction = async (agent: OAuthUserAgent, rkey: string): Promise => { + const rpc = createClient(agent); + await ok( + rpc.call(deleteRecordSchema, { + input: { repo: agent.sub, collection: REACTION_COLLECTION, rkey: rkey as RecordKey } + }) + ); +};