forked from polka_billy/porridger
Fixed spelling error
This commit is contained in:
@ -76,7 +76,7 @@ def single_annoncement(user_id:int):
|
||||
try:
|
||||
annoncement = db.get(Announcement, user_id)
|
||||
return {"id": annoncement.id, "user_id": annoncement.user_id, "name": annoncement.name,
|
||||
"category": annoncement.category, "best_by": annoncement.best_by, "adress": annoncement.adress,
|
||||
"category": annoncement.category, "best_by": annoncement.best_by, "address": annoncement.address,
|
||||
"description": annoncement.description, "metro": annoncement.metro, "latitude": annoncement.latitude,
|
||||
"longtitude":annoncement.longtitude, "trashId": annoncement.trashId, "src":annoncement.src,
|
||||
"booked_by":annoncement.booked_by}
|
||||
@ -102,7 +102,7 @@ def put_in_db(name: Annotated[str, Form()], category: Annotated[str, Form()], be
|
||||
|
||||
uploaded_name = "/uploads/"+destination.name
|
||||
|
||||
temp_ancmt = Announcement(user_id=userId, name=name, category=category, best_by=bestBy, adress=address, longtitude=longtitude, latitude=latitude, description=description, src=uploaded_name, metro=metro, trashId=trashId)
|
||||
temp_ancmt = Announcement(user_id=userId, name=name, category=category, best_by=bestBy, address=address, longtitude=longtitude, latitude=latitude, description=description, src=uploaded_name, metro=metro, trashId=trashId)
|
||||
db.add(temp_ancmt) # добавляем в бд
|
||||
db.commit() # сохраняем изменения
|
||||
db.refresh(temp_ancmt) # обновляем состояние объекта
|
||||
|
Reference in New Issue
Block a user