Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions server/src/database/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ export async function getAllUsers(): Promise<
> {
try {
const users = await prisma.user.findMany({
where: {
NOT: {
id: 0, // exclude memo from all user search results
},
},
include: {
enrollments: {
include: {
Expand Down
16 changes: 14 additions & 2 deletions server/src/seeds/test-data/data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Day } from "common/types";
import type { Day, User } from "common/types";

export const subjects: Array<{
group: string;
Expand Down Expand Up @@ -30,7 +30,19 @@ export const interest = [
{ userId: 103, subjectId: 4 },
];

export const users = [
export const users: User[] = [
{
id: 0,
name: "メモ",
gender: "メモ",
grade: "メモ",
faculty: "メモ",
department: "メモ",
intro: "メモです。",
pictureUrl:
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvpbYflYCwbG_c11ADWhZUaf93zrtmvYYjSvY4NNxcF4Ri-XO6jiFZq-1InXfcxBjTD9_8jQntvnzML5F0geA04H9etzy3dcZ7SaqpbfKX4PmFgg8nplhaSLBCWo6zOIwq-jJc9tjrXxKV/s1600/bunbougu_memo.png",
guid: "0000",
},
{
id: 101,
name: "田中太郎",
Expand Down
Loading