Skip to content

Commit

Permalink
Merge pull request #39 from mimikun/fix/typo
Browse files Browse the repository at this point in the history
chore: fix typo
  • Loading branch information
sora32127 authored Apr 30, 2024
2 parents adc0b26 + f58114a commit 36a5cf7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/components/SubmitFormComponents/TextInputBoxAI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function TextInputBoxAI({
try {
const formData = new FormData();
formData.append("text", text);
formData.append("context", createContextSentense());
formData.append("context", createContextSentence());
formData.append("prompt", prompt);
const response = await fetch("/api/ai/getCompletion", {
method: "POST",
Expand Down Expand Up @@ -98,7 +98,7 @@ export default function TextInputBoxAI({
};
}

const createContextSentense = () => {
const createContextSentence = () => {
const contextValues = getContextFromLocalStorage();
const contextSetense = `以下のテキストはコンテキストを表すものです。文章を補完する際の参考にしてください。状況: ${contextValues.situationValue}。反省: ${contextValues.reflectionValue}。反省に対する反省: ${contextValues.counterReflectionValue}。メモ: ${contextValues.noteValue}。`;
return contextSetense;
Expand Down
2 changes: 1 addition & 1 deletion app/routes/_layout._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function loader() {
},
});

const recentVotedPostsAgg = await prisma.fctPostVoteHisotry.groupBy({
const recentVotedPostsAgg = await prisma.fctPostVoteHistory.groupBy({
by: ["postId"],
where: {
voteDateGmt : {
Expand Down
8 changes: 4 additions & 4 deletions app/routes/_layout.archives.$postId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export async function loader({ request }:LoaderFunctionArgs){
},
});

const commentVoteData = await prisma.fctCommentVoteHisotry.groupBy({
const commentVoteData = await prisma.fctCommentVoteHistory.groupBy({
by: ["commentId", "voteType" ],
_count: { commentId: true },
where: {
Expand Down Expand Up @@ -110,7 +110,7 @@ export async function loader({ request }:LoaderFunctionArgs){
});

const isAdmin = await isAdminLogin(request);
const tagNames = postContent.rel_post_tags.map((rel) => rel.dimTag.tagName); // MetaFuctionで使用するため、ここで定義
const tagNames = postContent.rel_post_tags.map((rel) => rel.dimTag.tagName); // MetaFunctionで使用するため、ここで定義

return json({ postContent, comments, commentVoteData, likedPages, dislikedPages, likedComments, dislikedComments, similarPosts, prevPost, nextPost, isAdmin, tagNames });
}
Expand Down Expand Up @@ -445,7 +445,7 @@ async function handleVotePost(
}

await prisma.$transaction(async (prisma) => {
await prisma.fctPostVoteHisotry.create({
await prisma.fctPostVoteHistory.create({
data: {
voteUserIpHash: userIpHashString,
postId,
Expand Down Expand Up @@ -487,7 +487,7 @@ async function handleVoteComment(
const voteType = formData.get("voteType")?.toString();
const commentId = Number(formData.get("commentId"));
await prisma.$transaction(async (prisma) => {
await prisma.fctCommentVoteHisotry.create({
await prisma.fctCommentVoteHistory.create({
data: {
voteUserIpHash: userIpHashString,
commentId,
Expand Down
4 changes: 2 additions & 2 deletions app/routes/_layout.feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
const gteDate = new Date(now.getTime() - likeFromHourInt * 60 * 60 * 1000);
const lteDate = new Date(now.getTime() - likeToHourInt * 60 * 60 * 1000);

const recentVotedPostsAgg = await prisma.fctPostVoteHisotry.groupBy({
const recentVotedPostsAgg = await prisma.fctPostVoteHistory.groupBy({
by: ["postId"],
where: {
voteDateGmt: {
Expand Down Expand Up @@ -66,7 +66,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
return { ...post, tagNames };
});

const voteData = await prisma.fctPostVoteHisotry.findMany({
const voteData = await prisma.fctPostVoteHistory.findMany({
where: {
voteDateGmt: {
gte: gteDate,
Expand Down
2 changes: 1 addition & 1 deletion prisma/dimComments.csv
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"9052","17742","名無し","133.32.129.56","2022-10-30 00:07:08+00","2022-10-29 15:07:08+00","草生える","0","3d2ffc2e-255f-4a07-a9b6-f75f65de33a1"
"9053","17742","名無し","133.32.129.56","2022-10-29 17:19:41+00","2022-10-29 08:19:41+00","相手の厚意に付け込んでズル(あるいは楽?)をしようとすればいくらでも出来るけど、そのしわ寄せがどこに行くのか少しは考えたほうがいい。\nアンパンマンが顔をちぎって差し出してくれるからといって、顔全部食べたらアンパンマンは倒れる。","0","0e6898b2-0493-4af1-8085-3285275aeda4"
"9054","17742","名無し","133.32.129.56","2022-10-29 11:49:02+00","2022-10-29 02:49:02+00","バレなきゃOK","0","455bee1a-b88a-4484-a470-d7c82f90b5d1"
"17390","17742","Anonymouse","106.72.134.0","2023-03-06 17:43:18+00","2023-03-06 08:43:18+00","核融合発電は、現在、実証炉が建設され、必要な要素技術の洗い出しと、その開発がこれから行われます。(日本も実証炉への協力ほか、東北地方の機関で国際協力のもと材料開発に参画しています)\n核融合発電はその発電のために大きな発電所が必要だったり、その難易度の高さなどから実現不可能と言われることもありましたが、現在は実証段階であり、その次の原型炉の段階を経て実用化への道筋がつくということになります。\n現在のロードマップではこれが今世紀後半あたりからとりかかれればいいな、という感じで、一般的には来世紀まで実現に時間がかかるだろうと言われています。\n\n核融合発電は原理的に、核廃棄物は出るものの、現在の原子炉と違い、核反応による事故は起こり得ない(それくらい難しい)ので、人工衛星発電と並んで安全かつクリーンな真の夢のエネルギーです。ぜひ気長にお待ちください。","9049","8151c790-25b8-403c-a8cf-fc3cb33cf53d"
"17390","17742","Anonymous","106.72.134.0","2023-03-06 17:43:18+00","2023-03-06 08:43:18+00","核融合発電は、現在、実証炉が建設され、必要な要素技術の洗い出しと、その開発がこれから行われます。(日本も実証炉への協力ほか、東北地方の機関で国際協力のもと材料開発に参画しています)\n核融合発電はその発電のために大きな発電所が必要だったり、その難易度の高さなどから実現不可能と言われることもありましたが、現在は実証段階であり、その次の原型炉の段階を経て実用化への道筋がつくということになります。\n現在のロードマップではこれが今世紀後半あたりからとりかかれればいいな、という感じで、一般的には来世紀まで実現に時間がかかるだろうと言われています。\n\n核融合発電は原理的に、核廃棄物は出るものの、現在の原子炉と違い、核反応による事故は起こり得ない(それくらい難しい)ので、人工衛星発電と並んで安全かつクリーンな真の夢のエネルギーです。ぜひ気長にお待ちください。","9049","8151c790-25b8-403c-a8cf-fc3cb33cf53d"
"18084","17742","Anonymous","14.11.193.129","2023-03-16 20:32:06+00","2023-03-16 11:32:06+00","行動的でいいと思うwww","0","ee1a353b-b0fe-44e7-a938-4db919cbc73a"
"21127","17742","Anonymous","104.28.99.204","2023-06-21 17:09:02+00","2023-06-21 08:09:02+00","期待してる","17390","7b89b702-9740-4d57-be1f-59184905b01a"
"22733","17742","かるろす","14.9.195.128","2023-07-25 16:30:16+00","2023-07-25 07:30:16+00","電気とガスは民間で水道だけ公営ですからね。圧倒的に無料化のハードルが違いますよ。自分から見て同じようなものを社会的にも同じようなものだと思うのは健常者力足りてないですね。","9050","8f318b94-7942-4912-ae7d-beb2b65aad84"
Expand Down
8 changes: 4 additions & 4 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ model DimComments {
commentParent Int @map("comment_parent")
uuid String @default(dbgenerated("gen_random_uuid()")) @map("uuid") @db.Uuid
dimPosts DimPosts @relation(fields: [postId], references: [postId], onDelete: Cascade, map: "public_dim_comments_post_id_fkey")
fct_comment_vote_history FctCommentVoteHisotry[]
fct_comment_vote_history FctCommentVoteHistory[]
@@index([commentDateGmt], map: "idx_28782_comment_date_gmt")
@@index([commentParent], map: "idx_28782_comment_parent")
@@index([postId], map: "idx_28782_comment_post_id")
@@map("dim_comments")
}

model FctPostVoteHisotry {
model FctPostVoteHistory {
voteDateGmt DateTime @default(dbgenerated("(now() AT TIME ZONE 'utc'::text)")) @map("vote_date_gmt") @db.Timestamptz(6)
voteUserIpHash String @map("vote_user_ip_hash")
postId Int @map("post_id")
Expand All @@ -61,7 +61,7 @@ model FctPostVoteHisotry {
@@map("fct_post_vote_history")
}

model FctCommentVoteHisotry {
model FctCommentVoteHistory {
commentVoteId Int @id @unique @default(autoincrement()) @map("comment_vote_id")
voteUserIpHash String @map("vote_user_ip_hash")
commentId Int @map("comment_id")
Expand Down Expand Up @@ -113,7 +113,7 @@ model DimPosts {
ogpImageUrl String? @map("ogp_image_url")
dimComments DimComments[]
fct_post_edit_history FctPostEditHistory[]
fct_post_vote_history FctPostVoteHisotry[]
fct_post_vote_history FctPostVoteHistory[]
now_editing_pages nowEditingPages?
rel_post_tags RelPostTags[]
Expand Down
4 changes: 2 additions & 2 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function main() {
]
);
for (const record of fctPostVoteHistoryRecords) {
await prisma.fctPostVoteHisotry.create({
await prisma.fctPostVoteHistory.create({
data: {
voteDateGmt: new Date(record.vote_date_gmt),
voteUserIpHash: record.vote_user_ip_hash,
Expand All @@ -162,7 +162,7 @@ async function main() {
);

for (const record of fctCommentVoteHistoryRecords) {
await prisma.fctCommentVoteHisotry.create({
await prisma.fctCommentVoteHistory.create({
data: {
commentVoteId: parseInt(record.comment_vote_id),
voteUserIpHash: record.vote_user_ip_hash,
Expand Down

1 comment on commit 36a5cf7

@vercel
Copy link

@vercel vercel bot commented on 36a5cf7 Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.