feat: member portal Sprint 11 — Memories / Gallery
- GalleryAlbum + GalleryItem models + migration (publish gate, cover image, ordered items) - GalleryModule: admin CRUD for albums + items - Member endpoints: GET /my/memories (published albums w/ cover + count), GET /my/memories/:id (album + photos) - /my/memories page: album grid with cover thumbnails - /my/memories/[id] page: photo grid with captions - Memories nav item; register GalleryModule Completes Phase 2 (Intelligence) of the member portal — Sprints 9-11. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { SevaService } from '../seva/seva.service';
|
||||
import { CirclesService } from '../circles/circles.service';
|
||||
import { AskAIService } from '../ask-ai/ask-ai.service';
|
||||
import { KnowledgeService } from '../knowledge/knowledge.service';
|
||||
import { GalleryService } from '../gallery/gallery.service';
|
||||
import { MemberAuth } from '../auth/member-auth.decorator';
|
||||
import { CurrentMember } from '../auth/current-member.decorator';
|
||||
import type { MemberJwtPayload } from '@tower/types';
|
||||
@@ -32,6 +33,7 @@ export class MyController {
|
||||
private readonly circles: CirclesService,
|
||||
private readonly askAI: AskAIService,
|
||||
private readonly knowledge: KnowledgeService,
|
||||
private readonly gallery: GalleryService,
|
||||
) {}
|
||||
|
||||
@Get('knowledge')
|
||||
@@ -39,6 +41,16 @@ export class MyController {
|
||||
return this.knowledge.listForMember(member.tenantId, q);
|
||||
}
|
||||
|
||||
@Get('memories')
|
||||
memoriesList(@CurrentMember() member: MemberJwtPayload) {
|
||||
return this.gallery.listForMember(member.tenantId);
|
||||
}
|
||||
|
||||
@Get('memories/:id')
|
||||
memoriesAlbum(@CurrentMember() member: MemberJwtPayload, @Param('id') id: string) {
|
||||
return this.gallery.getAlbumForMember(member.tenantId, id);
|
||||
}
|
||||
|
||||
@Get('ask')
|
||||
askHistory(@CurrentMember() member: MemberJwtPayload) {
|
||||
return this.askAI.history(member.sub, member.tenantId);
|
||||
|
||||
@@ -7,9 +7,10 @@ import { GamificationModule } from '../gamification/gamification.module';
|
||||
import { CirclesModule } from '../circles/circles.module';
|
||||
import { AskAIModule } from '../ask-ai/ask-ai.module';
|
||||
import { KnowledgeModule } from '../knowledge/knowledge.module';
|
||||
import { GalleryModule } from '../gallery/gallery.module';
|
||||
|
||||
@Module({
|
||||
imports: [AuthModule, SevaModule, GamificationModule, CirclesModule, AskAIModule, KnowledgeModule],
|
||||
imports: [AuthModule, SevaModule, GamificationModule, CirclesModule, AskAIModule, KnowledgeModule, GalleryModule],
|
||||
controllers: [MyController],
|
||||
providers: [MyService],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user