adds prod container and fixes build issues
This commit is contained in:
@@ -4,7 +4,8 @@ import { getUser } from "./fetch";
|
||||
import { paths, components } from "muzak/data/types";
|
||||
|
||||
const fetcher = Fetcher.for<paths>();
|
||||
const BASE_URL = process.env.BACKEND_HOST!;
|
||||
const BASE_URL = process.env.NEXT_PUBLIC_BACKEND_HOST!;
|
||||
console.log("beest url", BASE_URL);
|
||||
|
||||
// Configure the fetcher
|
||||
fetcher.configure({
|
||||
@@ -19,7 +20,7 @@ fetcher.configure({
|
||||
async (url, init, next) => {
|
||||
const user = getUser();
|
||||
if (user?.access_token) {
|
||||
init.headers = {
|
||||
(init.headers as any) = {
|
||||
...init.headers,
|
||||
Authorization: `Bearer ${user.access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
@@ -76,7 +77,6 @@ export const api = {
|
||||
export type User = components["schemas"]["User"];
|
||||
export type Track = components["schemas"]["Track"];
|
||||
export type Album = components["schemas"]["Album"];
|
||||
export type Vote = components["schemas"]["Vote"];
|
||||
export type Profile = components["schemas"]["Profile"];
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user