File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,6 @@ FROM python:3.11-slim
2
2
3
3
WORKDIR /app
4
4
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- && rm -rf /var/lib/apt/lists/*
9
-
10
5
# Install Poetry
11
6
RUN pip install poetry
12
7
@@ -19,9 +14,6 @@ RUN poetry config virtualenvs.create false
19
14
# Install dependencies
20
15
RUN poetry install
21
16
22
- # run migrations
23
- RUN make migrate
24
-
25
17
# Expose the port the app runs on
26
18
EXPOSE 8000
27
19
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
import type { NextRequest } from "next/server" ;
3
- import { GetAPIKey } from "@/services/user" ;
4
3
import localStorage from "@/lib/localStorage" ;
4
+ import { APIKeyData } from "./interfaces/user" ;
5
+ import axios from "axios" ;
5
6
6
7
export async function middleware ( request : NextRequest ) {
7
8
let apiKey = null ;
8
9
try {
9
- apiKey = await GetAPIKey ( ) ;
10
+ // Hardcoded for now for the docker
11
+ const response = await axios . get < { data : APIKeyData } > (
12
+ `http://backend:5328/v1/user/get-api-key`
13
+ ) ;
14
+
15
+ apiKey = { data : { api_key : response . data . data . key } } ;
10
16
} catch ( error ) {
11
17
console . error ( "Error fetching API key:" , error ) ;
12
18
return NextResponse . redirect ( new URL ( "/api-key-setup" , request . url ) ) ;
You can’t perform that action at this time.
0 commit comments