Stainless (#54)
* Fix DEV-291 * FastAPI Security Bearer Token * Error Handling for Unique Keys * Documentation
This commit is contained in:
parent
107b40b9ac
commit
0eba9db235
|
|
@ -1,5 +1,5 @@
|
|||
# 🫡 Honcho
|
||||

|
||||

|
||||
[](https://discord.gg/plasticlabs)
|
||||

|
||||

|
||||
|
|
|
|||
|
|
@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [0.0.8] — 2024-05-09
|
||||
|
||||
### Added
|
||||
|
||||
* Documentation to OpenAPI
|
||||
* Bearer token auth to OpenAPI routes
|
||||
* Get by ID routes for users and collections
|
||||
|
||||
### Changed
|
||||
|
||||
* Authentication Middleware now implemented using built-in FastAPI Security
|
||||
module
|
||||
* Get by name routes for users and collections now include "name" in slug
|
||||
|
||||
### Fixed
|
||||
|
||||
* Error reporting for methods with integrity errors due to unique key
|
||||
constraints
|
||||
|
||||
## [0.0.7] — 2024-04-01
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "honcho"
|
||||
version = "0.0.7"
|
||||
version = "0.0.8"
|
||||
description = "Honcho Server"
|
||||
authors = ["Plastic Labs <hello@plasticlabs.ai>"]
|
||||
readme = "README.md"
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ app = FastAPI(
|
|||
summary="An API for adding personalization to AI Apps",
|
||||
description="""This API is used to store data and get insights about users for AI
|
||||
applications""",
|
||||
version="0.1.0",
|
||||
version="0.0.8",
|
||||
contact={
|
||||
"name": "Plastic Labs",
|
||||
"url": "https://plasticlabs.ai",
|
||||
|
|
@ -223,6 +223,16 @@ app.add_middleware(
|
|||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
origins = ["http://localhost", "http://127.0.0.1:8000", "https://demo.honcho.dev"]
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
if OPENTELEMTRY_ENABLED:
|
||||
FastAPIInstrumentor().instrument_app(app)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ async def create_app(
|
|||
try:
|
||||
honcho_app = await crud.create_app(db, app=app)
|
||||
return honcho_app
|
||||
|
||||
except IntegrityError as e:
|
||||
raise HTTPException(
|
||||
status_code=406, detail="App with name may already exist"
|
||||
|
|
|
|||
Loading…
Reference in New Issue