-
Notifications
You must be signed in to change notification settings - Fork 1
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 #212 from TripInfoWeb/dev_gathering
Dev gathering
- Loading branch information
Showing
27 changed files
with
693 additions
and
354 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { NextRequest, NextResponse } from "next/server"; | ||
|
||
export async function GET(request: NextRequest) { | ||
const queryString = request.url.substring(request.url.indexOf("/api/gathering")+14); | ||
const access_cookie = request.cookies.get("access_token"); | ||
|
||
try { | ||
const response = await fetch( | ||
`${process.env.BACKEND_URL}/api/gatherings`+queryString, | ||
{ | ||
method: "GET", | ||
headers: { | ||
Cookie: `${access_cookie?.name}=${access_cookie?.value}`, | ||
"Content-Type": "application/json", | ||
}, | ||
cache: "no-cache" | ||
}, | ||
); | ||
|
||
if (response.status === 200) { | ||
const data = await response.json(); | ||
return new NextResponse(JSON.stringify(data), { | ||
status: 200, | ||
}); | ||
} | ||
} catch (error) { | ||
console.error("서버에서 데이터 처리 중 오류 발생:", error); | ||
return NextResponse.json({ error: "서버 오류" }, { status: 500 }); | ||
} | ||
} |
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
Oops, something went wrong.