Skip to content

Commit

Permalink
update search to assetSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Aug 3, 2023
1 parent 32fc660 commit 246d51e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { getContributors } from "@/routes/discord/contributors";
import { index } from "@/routes";
import { getGenerator } from "@/routes/oc-generators/getGenerator";
import { getGenerators } from "@/routes/oc-generators/getGenerators";
import { getSearch, getRecentAssets } from "@/routes/search/search";
import { getAssetSearch, getRecentAssets } from "@/routes/search/assetSearch";
import { downloadFile } from "@/routes/download/downloadFile";
import { getUserByUsername } from "@/routes/user/getUserByUsername";
import { getUserBySearch } from "@/routes/user/getUsersBySearch";
import { allGames } from "@/routes/games/allGames";
import { getAssetFromId } from "@/routes/asset/getAssetFromId";
import { createNotFoundResponse } from "@/lib/helpers/responses/notFoundResponse";
import { login } from "@/routes/auth/login";
import { logout } from "@/routes/auth/logout";
import { signup } from "@/routes/auth/signup";
// import { login } from "@/routes/auth/login";
// import { logout } from "@/routes/auth/logout";
// import { signup } from "@/routes/auth/signup";

const router = Router();

Expand All @@ -25,14 +25,14 @@ router
.get("/recent", errorHandler(getRecentAssets))
.get("/asset/:id", errorHandler(getAssetFromId))
.get("/user/s/:name", errorHandler(getUserBySearch))
.get("/search", errorHandler(getSearch))
.get("/search/assets", errorHandler(getAssetSearch))
.get("/download/:id", errorHandler(downloadFile))
.get("/oc-generators", errorHandler(getGenerators))
.get("/oc-generator/:gameId", errorHandler(getGenerator))
.get("/discord/contributors", errorHandler(getContributors))
.post("/auth/login", errorHandler(login))
.post("/auth/logout", errorHandler(logout))
.post("/auth/signup", errorHandler(signup))
// .post("/auth/login", errorHandler(login))
// .post("/auth/logout", errorHandler(logout))
// .post("/auth/signup", errorHandler(signup))
.all("*", (): Response => {
return createNotFoundResponse("Route doesn't exist", responseHeaders);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSearchResults } from "@/lib/query";
import { getConnection } from "@/lib/planetscale";
import { getQueryParam } from "@/lib/helpers/getQueryParams";

export const getSearch = async (
export const getAssetSearch = async (
request: Request,
env: Env
): Promise<Response> => {
Expand Down Expand Up @@ -49,7 +49,7 @@ export const getSearch = async (
JSON.stringify({
success: true,
status: "ok",
path: "/search",
path: "/search/assets",
query,
game,
asset,
Expand Down

0 comments on commit 246d51e

Please sign in to comment.