Skip to content

(#9) Redirect 기능 추가 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 21, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix : 500Error
  • Loading branch information
eungyeole committed Jun 21, 2021
commit 05e9fd89d84bc4582200e680dfcbe0a8934a91ec
2 changes: 1 addition & 1 deletion api/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = async (req, res) => {
try{
const post = await fetchPost(name, tag);
const url = new String(`https://velog.io/@${post.user.username}/${post.url_slug}`)
res.send(<script>window.location.href={url}</script>);
res.send(`<script>window.location.href=${url}</script>`);
return
} catch(e){
return res.send(e.message)
Expand Down