-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #620 from benjamin-747/main
add lexical rich component in mr comment
- Loading branch information
Showing
30 changed files
with
1,037 additions
and
41 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
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
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,24 @@ | ||
import { verifySession } from "@/app/lib/dal"; | ||
|
||
export async function POST(request: Request, { params }: { params: { id: string } }) { | ||
const session = await verifySession() | ||
const jsonData = await request.json(); | ||
|
||
// Check if the user is authenticated | ||
if (!session) { | ||
// User is not authenticated | ||
return new Response(null, { status: 401 }) | ||
} | ||
|
||
const endpoint = process.env.MEGA_INTERNAL_HOST; | ||
const res = await fetch(`${endpoint}/api/v1/mr/${params.id}/comment`, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify(jsonData), | ||
}) | ||
const data = await res.json() | ||
|
||
return Response.json({ data }) | ||
} |
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,19 @@ | ||
import { verifySession } from "@/app/lib/dal"; | ||
|
||
export async function POST(request: Request, { params }: { params: { id: string } }) { | ||
const session = await verifySession() | ||
|
||
// Check if the user is authenticated | ||
if (!session) { | ||
// User is not authenticated | ||
return new Response(null, { status: 401 }) | ||
} | ||
|
||
const endpoint = process.env.MEGA_INTERNAL_HOST; | ||
const res = await fetch(`${endpoint}/api/v1/mr/comment/${params.id}/delete`, { | ||
method: 'POST', | ||
}) | ||
const data = await res.json() | ||
|
||
return Response.json({ data }) | ||
} |
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,3 +1,4 @@ | ||
export const revalidate = 0 | ||
|
||
export async function GET() { | ||
const endpoint = process.env.MEGA_HOST; | ||
|
Oops, something went wrong.
1575544
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mega – ./
mega-gitmono.vercel.app
gitmega.dev
www.gitmega.dev
mega-git-main-gitmono.vercel.app