Skip to content

Commit

Permalink
Merge pull request #85 from rimgosu/main
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
rimgosu authored Feb 23, 2024
2 parents 6d6c385 + 42c00e0 commit ba86043
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/api/api_v1/endpoints/gree.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import List
from animated_drawings import render

from fastapi import Depends, HTTPException, APIRouter, File, UploadFile, Body
from fastapi import Depends, HTTPException, APIRouter, File, UploadFile, Body, Response
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from concurrent.futures import ProcessPoolExecutor
Expand Down Expand Up @@ -115,8 +115,9 @@ async def update_gree(gree_id: int, gree_update: GreeUpdate, current_user: Membe


@router.get('/view', response_model=List[Gree])
async def read_grees(current_user: Member = Depends(get_current_user), db: AsyncSession = Depends(get_db)):
async def read_grees(response: Response, current_user: Member = Depends(get_current_user), db: AsyncSession = Depends(get_db)):
grees = await crud_get_grees(db, user_id=current_user.id)
response.headers['Content-Type'] = 'application/json; charset=utf-8'
return grees


Expand Down

0 comments on commit ba86043

Please sign in to comment.