Not adding missiln
This commit is contained in:
parent
1ab0cb1f1f
commit
8345614c8d
|
|
@ -7,7 +7,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential libpq-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends build-essential libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, Response, status
|
||||
from sqlalchemy import func
|
||||
from sqlalchemy.exc import NoResultFound
|
||||
from sqlalchemy.orm import Session, selectinload
|
||||
|
|
@ -380,7 +380,7 @@ def delete_artifact(
|
|||
*,
|
||||
db: Session = Depends(get_db),
|
||||
current_user=Depends(require_hr),
|
||||
) -> None:
|
||||
) -> Response:
|
||||
"""Удаляем артефакт, если он не привязан к миссиям."""
|
||||
|
||||
artifact = db.query(Artifact).filter(Artifact.id == artifact_id).first()
|
||||
|
|
@ -396,7 +396,7 @@ def delete_artifact(
|
|||
|
||||
db.delete(artifact)
|
||||
db.commit()
|
||||
return None
|
||||
return Response(status_code=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
@router.post("/missions", response_model=MissionDetail, summary="Создать миссию")
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ services:
|
|||
ports:
|
||||
- '3000:3000'
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://backend:8000
|
||||
NEXT_PUBLIC_API_URL: http://localhost:8000
|
||||
NEXT_INTERNAL_API_URL: http://backend:8000
|
||||
NEXT_PUBLIC_DEMO_EMAIL: candidate@alabuga.space
|
||||
NEXT_PUBLIC_DEMO_PASSWORD: orbita123
|
||||
NEXT_PUBLIC_DEMO_HR_EMAIL: hr@alabuga.space
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
|
||||
const CLIENT_API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
|
||||
const SERVER_API_URL = process.env.NEXT_INTERNAL_API_URL || CLIENT_API_URL;
|
||||
|
||||
export interface RequestOptions extends RequestInit {
|
||||
authToken?: string;
|
||||
|
|
@ -11,7 +12,8 @@ export async function apiFetch<T>(path: string, options: RequestOptions = {}): P
|
|||
headers.set('Authorization', `Bearer ${options.authToken}`);
|
||||
}
|
||||
|
||||
const response = await fetch(`${API_URL}${path}`, {
|
||||
const baseUrl = typeof window === 'undefined' ? SERVER_API_URL : CLIENT_API_URL;
|
||||
const response = await fetch(`${baseUrl}${path}`, {
|
||||
...options,
|
||||
headers,
|
||||
cache: 'no-store'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user