lovely. got a couple of partial implementations....

This commit is contained in:
Chris Kruining 2025-04-03 17:27:35 +02:00
parent 89ca4013fd
commit 89f526e9d9
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
14 changed files with 180 additions and 154 deletions

View file

@ -1,8 +1,8 @@
import type { Category, Entry } from './types';
import { cache } from "@solidjs/router";
import { query } from "@solidjs/router";
import { entries } from './data';
export const listCategories = cache(async (): Promise<Category[]> => {
export const listCategories = query(async (): Promise<Category[]> => {
"use server";
return [
@ -25,7 +25,7 @@ export const listCategories = cache(async (): Promise<Category[]> => {
];
}, 'series.categories.list');
export const getEntry = cache(async (id: Entry['id']): Promise<Entry | undefined> => {
export const getEntry = query(async (id: Entry['id']): Promise<Entry | undefined> => {
"use server";
return entries.get(id);