Skip to content

Commit

Permalink
Migrate from staging to default api modrinth. Rollback frontend nuxi …
Browse files Browse the repository at this point in the history
…prepare
  • Loading branch information
DIDIRUS4 committed Nov 16, 2024
1 parent 9f04645 commit 9b9e4ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/app-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@modrinth/app-frontend",
"private": true,
"version": "0.8.9031",
"version": "0.8.904",
"development_build": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions apps/frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { globIterate } from "glob";
import { match as matchLocale } from "@formatjs/intl-localematcher";
import { consola } from "consola";

const STAGING_API_URL = "https://staging-api.modrinth.com/v2/";
const API_URL = "https://api.modrinth.com/v2/";

const preloadedFonts = [
"inter/Inter-Regular.woff2",
Expand Down Expand Up @@ -433,7 +433,7 @@ export default defineNuxtConfig({

function getApiUrl() {
// @ts-ignore
return process.env.BROWSER_BASE_URL ?? globalThis.BROWSER_BASE_URL ?? STAGING_API_URL;
return process.env.BROWSER_BASE_URL ?? globalThis.BROWSER_BASE_URL ?? API_URL;
}

function isProduction() {
Expand All @@ -457,7 +457,7 @@ function getDomain() {
return `https://${process.env.HEROKU_APP_NAME}.herokuapp.com`;
} else if (process.env.VERCEL_URL) {
return `https://${process.env.VERCEL_URL}`;
} else if (getApiUrl() === STAGING_API_URL) {
} else if (getApiUrl() === API_URL) {
return "https://staging.modrinth.com";
} else {
return "https://modrinth.com";
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "nuxi dev",
"generate": "nuxi generate",
"preview": "nuxi preview",
"postinstall": "nuxi prepare",
"lint": "eslint . && prettier --check .",
"fix": "eslint . --fix && prettier --write .",
"intl:extract": "formatjs extract \"{,src/components,src/composables,src/layouts,src/middleware,src/modules,src/pages,src/plugins,src/utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file src/locales/en-US/index.json --format crowdin --preserve-whitespace"
Expand Down

0 comments on commit 9b9e4ae

Please sign in to comment.