Inscription : magasin en brouillon → page « indisponible » au lieu d'un 404
L'affichette peut être imprimée avant l'activation du magasin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dd70cb052a
commit
f844048777
4 changed files with 3 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,3 +16,4 @@ backend/DEPLOY
|
|||
backend/ROLLBACK
|
||||
backend/RESTART
|
||||
backend/.env.production
|
||||
init-production.sql
|
||||
|
|
|
|||
BIN
admin/si.zip
Normal file
BIN
admin/si.zip
Normal file
Binary file not shown.
BIN
backend/backen.zip
Normal file
BIN
backend/backen.zip
Normal file
Binary file not shown.
|
|
@ -55,7 +55,8 @@ export class EnrollmentPagesController {
|
|||
@Get('c/:slug')
|
||||
async enroll(@Param('slug') slug: string, @Res() res: Response) {
|
||||
const store = await this.enrollment.findStore(slug);
|
||||
if (!store || store.status === 'DRAFT') return html(res, notFoundPage(), 404);
|
||||
// Brouillon : l'affichette peut déjà être imprimée, on affiche « indisponible » plutôt qu'un 404.
|
||||
if (!store) return html(res, notFoundPage(), 404);
|
||||
if (store.status !== 'ACTIVE' || !store.cardDesign) return html(res, unavailablePage(store));
|
||||
html(res, enrollPage(store));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue