-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into kampus/setup-passport
- Loading branch information
Showing
45 changed files
with
1,116 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { type Clients } from "~/clients"; | ||
|
||
interface CreateCommentUpvoteArgs { | ||
commentID: string; | ||
userID: string; | ||
} | ||
|
||
interface RemoveCommentUpvoteArgs { | ||
commentID: string; | ||
userID: string; | ||
} | ||
|
||
export function createCommentUpvoteActions({ prisma }: Clients) { | ||
const create = (args: CreateCommentUpvoteArgs) => { | ||
return prisma.commentUpvote.create({ | ||
data: { | ||
comment: { connect: { id: args.commentID } }, | ||
owner: { connect: { id: args.userID } }, | ||
}, | ||
}); | ||
}; | ||
|
||
const remove = (args: RemoveCommentUpvoteArgs) => { | ||
return prisma.commentUpvote.delete({ | ||
where: { | ||
commentID_userID: { | ||
commentID: args.commentID, | ||
userID: args.userID, | ||
}, | ||
}, | ||
}); | ||
}; | ||
|
||
return { create, remove }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { createPanoCommentActions } from "~/features/pano/comment"; | ||
import { createPanoPostActions } from "~/features/pano/post"; | ||
import { type Clients } from "~/clients"; | ||
import { createCommentUpvoteActions } from "./commentUpvote"; | ||
import { createPostUpvoteActions } from "./postUpvote"; | ||
|
||
export function createPanoActions(clients: Clients) { | ||
return { | ||
post: createPanoPostActions(clients), | ||
comment: createPanoCommentActions(clients), | ||
postUpvote: createPostUpvoteActions(clients), | ||
commentUpvote: createCommentUpvoteActions(clients), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 15 additions & 2 deletions
17
apps/kampus/app/pano/__generated__/PanoFeedFragment.graphql.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.