feat: Multiple Features, Accessibility, Security, and UX Improvements #59

Merged
naomi merged 27 commits from feat/polish into main 2026-02-20 01:51:25 -08:00
Showing only changes of commit f0052cad76 - Show all commits
+9 -5
View File
@@ -8,6 +8,10 @@ import type {
Activity, Activity,
ActivityFeedResponse, ActivityFeedResponse,
ActivityUser, ActivityUser,
SuggestionActivity,
LikeActivity,
CommentActivity,
AchievementActivity,
} from "@library/shared-types"; } from "@library/shared-types";
import { ACHIEVEMENTS, ActivityType } from "@library/shared-types"; import { ACHIEVEMENTS, ActivityType } from "@library/shared-types";
import { prisma } from "../lib/prisma"; import { prisma } from "../lib/prisma";
@@ -61,7 +65,7 @@ export class ActivityService {
limit: number, limit: number,
offset: number, offset: number,
userId?: string userId?: string
) { ): Promise<SuggestionActivity[]> {
const where = userId const where = userId
? { userId, user: { profilePublic: true, isBanned: false } } ? { userId, user: { profilePublic: true, isBanned: false } }
: { user: { profilePublic: true, isBanned: false } }; : { user: { profilePublic: true, isBanned: false } };
@@ -104,7 +108,7 @@ export class ActivityService {
limit: number, limit: number,
offset: number, offset: number,
userId?: string userId?: string
) { ): Promise<LikeActivity[]> {
const where = userId const where = userId
? { userId, user: { profilePublic: true, isBanned: false } } ? { userId, user: { profilePublic: true, isBanned: false } }
: { user: { profilePublic: true, isBanned: false } }; : { user: { profilePublic: true, isBanned: false } };
@@ -131,7 +135,7 @@ export class ActivityService {
// For each like, fetch the entity title // For each like, fetch the entity title
const likesWithTitles = await Promise.all( const likesWithTitles = await Promise.all(
likes.map(async (like) => { likes.map(async (like): Promise<LikeActivity> => {
const entityTitle = await this.getEntityTitle( const entityTitle = await this.getEntityTitle(
like.entityType, like.entityType,
like.entityId like.entityId
@@ -158,7 +162,7 @@ export class ActivityService {
limit: number, limit: number,
offset: number, offset: number,
userId?: string userId?: string
) { ): Promise<CommentActivity[]> {
const where = userId const where = userId
? { userId, user: { profilePublic: true, isBanned: false } } ? { userId, user: { profilePublic: true, isBanned: false } }
: { user: { profilePublic: true, isBanned: false } }; : { user: { profilePublic: true, isBanned: false } };
@@ -246,7 +250,7 @@ export class ActivityService {
limit: number, limit: number,
offset: number, offset: number,
userId?: string userId?: string
) { ): Promise<AchievementActivity[]> {
const where = userId const where = userId
? { ? {
userId, userId,