personal discounts to businesses done

This commit is contained in:
Priec
2026-06-21 23:21:24 +02:00
parent ed566b5347
commit c713627a2c
35 changed files with 912 additions and 39 deletions

View File

@@ -12,8 +12,9 @@ async fn index(
ViewEngine(v): ViewEngine<TeraView>,
State(ctx): State<AppContext>,
) -> Result<Response> {
let products = shop::featured_products(&ctx, 8).await?;
let c = guard::chrome(&ctx, &jar).await;
let user = guard::current_user(&ctx, &jar).await;
let products = shop::featured_products(&ctx, user.as_ref(), 8).await?;
let c = guard::chrome_from(&ctx, user.as_ref());
format::view(
&v,