diff --git a/README.md b/README.md index 6d40e5a..2542be2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # 🫡 Honcho -![Static Badge](https://img.shields.io/badge/Version-0.0.7-blue) +![Static Badge](https://img.shields.io/badge/Version-0.0.8-blue) [![Discord](https://img.shields.io/discord/1016845111637839922?style=flat&logo=discord&logoColor=23ffffff&label=Plastic%20Labs&labelColor=235865F2)](https://discord.gg/plasticlabs) ![GitHub License](https://img.shields.io/github/license/plastic-labs/honcho) ![GitHub Repo stars](https://img.shields.io/github/stars/plastic-labs/honcho) diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md index 734bbba..70b5008 100644 --- a/api/CHANGELOG.md +++ b/api/CHANGELOG.md @@ -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 diff --git a/api/pyproject.toml b/api/pyproject.toml index 87ca662..e5131d5 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "honcho" -version = "0.0.7" +version = "0.0.8" description = "Honcho Server" authors = ["Plastic Labs "] readme = "README.md" diff --git a/api/src/main.py b/api/src/main.py index b018897..46bf2d3 100644 --- a/api/src/main.py +++ b/api/src/main.py @@ -200,7 +200,7 @@ async def lifespan(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 @@ async def lifespan(app: FastAPI): 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) diff --git a/api/src/routers/apps.py b/api/src/routers/apps.py index 8f85972..a35e02f 100644 --- a/api/src/routers/apps.py +++ b/api/src/routers/apps.py @@ -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"