79 Commits

Author SHA1 Message Date
c5934d05c6 Fix #28 2026-08-07 23:41:13 +02:00
0bcc83871d [Door] switch gpio out to mqtt 2026-08-05 03:22:55 +02:00
f635149d1f Check for disabled card and add tests 2026-08-05 00:52:46 +02:00
bbb41e41ab Add active check 2026-08-05 00:27:08 +02:00
023a704e36 Make scanning the keycard while open close the door 2026-08-01 23:27:54 +02:00
936b786659 Switch gpiozero(fuck you) for lgpio 2026-08-01 14:45:44 +02:00
158b430235 [settings] fuck it, rework the settings again
this time using pydantic-settings as a base
- removed all os.getenv calls
- removed the secret_key default option
- reworked database loading, creating tables
- prob. something else also but its 4:30 and i have to sleep
2026-07-31 04:33:18 +02:00
bad4e8dd1b [settings] rework settings 2026-07-31 01:50:08 +02:00
b7b07b82da [door] correct spelling, add status endpoint
the door section of the api should "just work" now
2026-07-31 00:38:40 +02:00
717ce951a6 [door] add doorcontroller with mock pins for testing 2026-07-31 00:36:11 +02:00
a8e80ed19d [main] fix startup when there's no db 2026-07-29 18:37:34 +02:00
7a70b6b1d4 [lint] more linting changes 2026-07-29 03:30:54 +02:00
3f20cdeed9 just_found_out_about_linters (#17)
This changed a bunch of code but no

Reviewed-on: #17
Co-authored-by: ahtlon <git@ahtlon.de>
Co-committed-by: ahtlon <git@ahtlon.de>
2026-07-29 02:46:50 +02:00
683cd9a545 [main.py] move settings stuff into its own import
also correct imports to use app namespace
2026-07-29 01:24:22 +02:00
1dfd01fc71 [CORS] fix methods
maybe add test for cors? idk how tho
2026-07-29 01:22:29 +02:00
54c7fe1ed2 [alembic] automaticly stamp new database with the "head" tag so migrations are easier.
also fix nix develop due to multiple top level folders
2026-07-28 16:14:33 +02:00
4b87603e06 [AA] fix patching AA with oneshots 2026-07-27 17:19:10 +02:00
5f19409da4 [AA] Add oneshot to checkAccess function 2026-07-27 17:19:10 +02:00
e45abb5c55 [AA] fix the db insert 2026-07-27 17:19:10 +02:00
47b84a097c [Models] This doesn't quite work yet but this is about the model im thinking of for the future 2026-07-27 17:19:10 +02:00
2d636f2bd7 [Main] add note about new doc url
Fixes #12
2026-07-01 17:54:16 +02:00
098925c026 [Cards] Add patch endpoint 2026-07-01 17:25:18 +02:00
cd1c056c9a [Cards, Users] Check unique and return error 2026-06-27 19:17:16 +02:00
b71e6388fa [Debug] fix debug router for new card model
(also remove_card_manually now actually removes cards...)
2026-06-27 17:12:40 +02:00
e2db1ecf37 [Cards] Add new fields to registration 2026-06-27 16:59:06 +02:00
7922e710cf [Cards] add serial, enabled, name fields 2026-06-27 16:39:23 +02:00
8268476053 [Users] avoid printing password to log 2026-06-27 16:38:13 +02:00
a32e820a02 [Card] change path operation to DELETE for #5 2026-06-27 15:55:10 +02:00
eec575c619 [Cards] Change all instances of uuid to key 2026-06-27 15:06:05 +02:00
17842a14fd Fix tests using the new api root 2026-06-24 15:54:06 +02:00
bc663582b5 Add get current user
Fixes #7
2026-06-24 15:38:19 +02:00
5f0e5b1bbb Move .env.example to the right place, fix login to also be at /api/v1 2026-06-24 15:37:32 +02:00
62bbbec1d3 Move api to /api/v1
This includes docs, which are now at http://127.0.0.1:8000/api/v1/docs
and the openapi.json, now at http://127.0.0.1:8000/api/v1/openapi.json

Fixes #4
2026-06-24 15:16:13 +02:00
336c6aa34e Add CORS middleware 2026-06-12 13:52:44 +02:00
5e8c826714 Fix issue #3 : allow DISABLE_CARDS envvar 2026-06-12 13:32:55 +02:00
9985251584 Add testing keys in .env.example 2026-06-06 11:18:24 +02:00
427e47534a Change status code of 'AA not assigned to group' 2026-06-04 15:05:42 +02:00
d00c5855b7 Add some debug functions for testing 2026-05-26 23:04:58 +02:00
44ea17d87a Improve logging a bit 2026-05-25 16:23:28 +02:00
9160b312c7 Fix the things i broke using logger.info 2026-05-23 20:35:12 +02:00
94d428c9d0 Change all instances of print() to logger.info() 2026-05-23 20:17:43 +02:00
a4bedba628 Remove mqtt 2026-05-23 20:09:12 +02:00
e6a248529b Fix test test_create_first_user() 2026-05-23 20:08:10 +02:00
6ec3bc5f14 Improve assign_accessauth test and change already assigned to 409 2026-05-23 18:58:59 +02:00
5a6cd970dd Fix change_accessauth() not changing timetables
Also fix the test not actually checking the response :/
2026-05-23 18:41:50 +02:00
3d1893d84e Fix door check db session 2026-05-23 17:32:28 +02:00
495535a6de Scanner write-read-delete workflow working! 2026-05-23 00:30:03 +02:00
30b86dad5e Increase login time 2026-05-22 23:14:55 +02:00
92eef82e0a Slight improvements 2026-05-22 21:56:30 +02:00
b81b6954ef Writing, deleting don 2026-05-22 08:28:35 +02:00