Skip to content

Commit

Permalink
ordered testimonials decending based on date
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-512 committed Sep 20, 2023
1 parent a5f2495 commit c85dd0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async () => {
const { data, error: e } = await supabase
.from('testimonials')
.select('name, description, quote, slug, image_url');
.select('name, description, quote, slug, image_url')
.order('received_at', { ascending: false });
if (e) throw error(404, 'Not found');
return { testimonials: data };
};

0 comments on commit c85dd0a

Please sign in to comment.