diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..cbdc18e --- /dev/null +++ b/vercel.json @@ -0,0 +1,111 @@ +{ + "version": 2, + "functions": { + "api/**/*.php": { + "runtime": "vercel-php@0.7.3" + } + }, + "cleanUrls": true, + "rewrites": [ + { + "source": "/api/v1/accounts/login", + "destination": "/api/v1/accounts/login.php" + }, + { + "source": "/api/v1/accounts/register", + "destination": "/api/v1/accounts/register.php" + }, + { + "source": "/api/v1/accounts/upload_profile_pic", + "destination": "/api/v1/accounts/upload_profile_pic.php" + }, + { + "source": "/api/v1/accounts/logout", + "destination": "/api/v1/accounts/logout.php" + }, + { + "source": "/api/v1/accounts/current_user", + "destination": "/api/v1/accounts/current_user.php" + }, + { + "source": "/api/v1/users/check_email", + "destination": "/api/v1/users/check_email.php" + }, + + { + "source": "/api/v1/feed/timeline", + "destination": "/api/v1/feed/timeline.php" + }, + { + "source": "/api/v1/feed/user/:user_id", + "destination": "/api/v1/feed/user.php?user_id=:user_id" + }, + { + "source": "/api/v1/feed/liked", + "destination": "/api/v1/feed/liked.php" + }, + { + "source": "/api/v1/feed/popular", + "destination": "/api/v1/feed/popular.php" + }, + + { + "source": "/api/v1/media/:media_id/like", + "destination": "/api/v1/media/like.php?media_id=:media_id" + }, + { + "source": "/api/v1/media/:media_id/unlike", + "destination": "/api/v1/media/unlike.php?media_id=:media_id" + }, + { + "source": "/api/v1/media/:media_id/comments", + "destination": "/api/v1/media/comments.php?media_id=:media_id" + }, + { + "source": "/api/v1/media/:media_id/comment", + "destination": "/api/v1/media/comment_add.php?media_id=:media_id" + }, + { + "source": "/api/v1/media/:media_id/delete", + "destination": "/api/v1/media/delete.php?media_id=:media_id" + }, + { + "source": "/api/v1/media/upload", + "destination": "/api/v1/media/upload.php" + }, + { + "source": "/api/v1/media/configure", + "destination": "/api/v1/media/configure.php" + }, + + { + "source": "/api/v1/users/:user_id/info", + "destination": "/api/v1/users/info.php?user_id=:user_id" + }, + { + "source": "/api/v1/friendships/create/:user_id", + "destination": "/api/v1/friendships/follow.php?user_id=:user_id" + }, + { + "source": "/api/v1/friendships/destroy/:user_id", + "destination": "/api/v1/friendships/unfollow.php?user_id=:user_id" + }, + { + "source": "/api/v1/friendships/show/:user_id", + "destination": "/api/v1/friendships/show.php?user_id=:user_id" + }, + + { + "source": "/api/v1/direct_v2/inbox", + "destination": "/api/v1/direct_v2/inbox.php" + }, + { + "source": "/api/v1/direct_v2/threads/:thread_id", + "destination": "/api/v1/direct_v2/threads.php?thread_id=:thread_id" + }, + { + "source": "/api/v1/direct_v2/threads/broadcast", + "destination": "/api/v1/direct_v2/broadcast.php" + } + ] +}