Commit graph

411 commits

Author SHA1 Message Date
d6cf778053 Move registration to auth 2022-10-03 22:50:09 -07:00
753ae2729e Add nested transaction logic 2022-10-03 22:42:22 -07:00
955df7b044 refactor 2022-10-03 19:41:59 -07:00
4b5d11b00a More refactoring 2022-10-01 22:18:24 -07:00
c6d80fd4d3 Sql refactor 2022-10-01 02:05:33 -07:00
c42039c559 Refactoring 2022-09-29 14:52:01 -07:00
33d1834f19 SQL Refactor 2022-09-25 01:10:30 -07:00
33cf0ff87a Move to new DB api 2022-09-14 18:12:07 -07:00
db225b6689 Create helper utils in sql pkg 2022-09-11 04:38:46 -07:00
e94e4384bb Add postgres support in db package 2022-09-11 01:55:20 -07:00
c8641247fe Add utility alloc/clone functions 2022-09-10 15:29:22 -07:00
994c9e8cf2 Add Url type 2022-09-10 15:29:08 -07:00
0a42274b27 Build paginated query 2022-09-09 21:02:51 -07:00
8763132d35 Create integration test 2022-09-08 22:01:57 -07:00
6e2754225f Playing with tests in build.zig 2022-09-08 01:50:10 -07:00
ca123c1cc0 Notes 2022-09-08 00:52:23 -07:00
8222d651ad Make email parameter optional 2022-09-08 00:06:55 -07:00
e0fd7097eb User creation 2022-09-07 23:56:29 -07:00
a28f9fd38c Invites 2022-09-07 22:10:58 -07:00
075b922ef5 Mvoing controllers around 2022-09-07 19:19:46 -07:00
99337b6429 Remove dead code 2022-09-07 19:01:24 -07:00
91c116a303 Narrowing down error sets 2022-09-07 18:55:55 -07:00
ab96b3b734 messing w/ stuff 2022-09-07 16:14:52 -07:00
913a84c4fa Add login verification endpoint 2022-09-05 03:54:17 -07:00
8ee663000d Create cluster community 2022-09-05 02:15:16 -07:00
1d4b0a6e77 Use default admin user 2022-09-05 01:52:49 -07:00
e2381f1eaf Disable routes for now 2022-09-05 00:10:03 -07:00
4bddb9f633 fucking around w/ db stuff 2022-09-05 00:07:46 -07:00
d694674585 Fixes for stage2 compiler 2022-07-13 07:42:30 -07:00
84e62ffe38 Fully working query builder 2022-08-07 13:28:20 -07:00
b6a3b68cff Add query builder struct 2022-08-07 00:54:22 -07:00
ee4aa9e826 Construct QueryTables from model list 2022-08-03 22:08:32 -07:00
f28046bd79 Add QueryTable 2022-08-03 21:52:07 -07:00
80ded57904 Add conditions to query builder 2022-08-03 21:32:59 -07:00
4087345323 Read host header 2022-08-01 23:35:56 -07:00
9c94cafe95 Log errors instead of panic 2022-08-01 23:24:16 -07:00
bdd2d48a87 Take community url as string 2022-08-01 22:21:03 -07:00
6c15849882 Add communities 2022-08-01 21:33:23 -07:00
c31633cade refactor 2022-07-30 13:40:20 -07:00
c1f8b8f0e2 Track DB migrations 2022-07-30 00:26:35 -07:00
40a2391942 Add config file 2022-07-29 23:14:42 -07:00
99192bccdd Clean up db models 2022-07-29 22:52:00 -07:00
f6f24a557e Fix compile errors on latest zig 2022-07-27 20:13:25 -07:00
ae9a062caf Track invite uses and handle properly 2022-07-26 23:03:27 -07:00
76f2b818ab Allow registration with invite 2022-07-26 22:30:52 -07:00
01ef4427f5 Generate invite codes 2022-07-26 22:02:09 -07:00
a020199773 Refactor api calls 2022-07-25 19:07:05 -07:00
47e157e31b Use threadlocal prng 2022-07-24 17:18:25 -07:00
a7b1361048 Verify incoming tokens 2022-07-24 17:04:44 -07:00
b05abf95ac Move models to db subdir 2022-07-24 02:01:17 -07:00
7fc83b6e56 Issue tokens on login 2022-07-23 22:19:32 -07:00
3e91d66565 Remove storage policy from sql lib 2022-07-23 21:29:38 -07:00
ada0eb71f5 Add sql support for blobs 2022-07-23 21:14:46 -07:00
ab61efc44a Add id and created_at fields to db models 2022-07-22 00:08:01 -07:00
dc8877eef3 Refactoring controllers 2022-07-21 23:53:05 -07:00
ee0db68c5e Split users into actors and localusers 2022-07-21 21:19:08 -07:00
a4f6fca675 Support optional types in sql 2022-07-21 21:18:43 -07:00
cc44bbf12b Better error messages 2022-07-21 21:18:20 -07:00
e6217d543d Basic password auth 2022-07-20 22:26:13 -07:00
7b1e4030b0 Refactoring 2022-07-20 20:42:16 -07:00
73662d675a Fully implement api free() 2022-07-19 02:22:19 -07:00
718da7b408 Basic reacts 2022-07-19 00:07:01 -07:00
07019cb090 Track creation time for notes 2022-07-18 00:37:10 -07:00
b1190ddea8 Add DateTime 2022-07-18 00:03:29 -07:00
f28f71c978 Remove dead code 2022-07-17 23:13:20 -07:00
11d4a52b2d Collect author id from user context 2022-07-17 23:11:42 -07:00
87903ca17b Create user contexts 2022-07-17 16:21:03 -07:00
52003f5e4f Remove unused helpers 2022-07-16 12:31:36 -07:00
b80eba6fcf Check user handle is available 2022-07-16 12:30:47 -07:00
1d6f7bfa08 Allow querying by other fields 2022-07-16 12:00:33 -07:00
90d2dcd4c1 Remove references to memdb 2022-07-16 11:44:46 -07:00
74fb8d2574 Use sql api for users 2022-07-16 11:41:09 -07:00
40e7037444 Type-introspected insert 2022-07-15 22:29:08 -07:00
c9c5958849 Use type introspection in db wrapper 2022-07-15 21:33:01 -07:00
b82600e8cd Store notes in SQLite 2022-07-15 00:27:27 -07:00
163811caa0 Basic sqlite adapter 2022-07-14 17:58:08 -07:00
caa599986d Reorganize controllers 2022-07-13 00:57:21 -07:00
2092bbdffa Check users for duplicates 2022-07-12 22:35:39 -07:00
f5548c0243 Create Table abstraction 2022-07-12 22:08:18 -07:00
16d093b4f7 Add users 2022-07-12 21:56:47 -07:00
b3c9c3b600 Move body parsing to new fn 2022-07-12 21:41:26 -07:00
d27c38330b Better error messages 2022-07-12 21:31:52 -07:00
44cb7017b2 Make api return full note 2022-07-12 21:28:54 -07:00
3f3e9e039e Add JSON stringification for UUIDs 2022-07-12 21:23:50 -07:00
ad6f1454a6 Use Uuids for id 2022-07-12 21:16:33 -07:00
20af2c82c8 Use u128 as backing field for Uuid 2022-07-12 20:55:19 -07:00
ccf79febe4 Basic api server 2022-07-12 20:40:48 -07:00
255a11bc8b Add createNote endpoint 2022-07-10 19:39:28 -07:00
d8f8a3ec89 Create putNote 2022-07-10 17:58:39 -07:00
b3a3a66068 Handle not found errors better 2022-07-10 17:52:28 -07:00
470fa50bb1 Get ID from route 2022-07-10 17:40:17 -07:00
b738a02e16 Pass note ID to db 2022-07-10 17:14:32 -07:00
5933e37f85 Retrieve note dynamically 2022-07-10 17:12:52 -07:00
80c94711ae Add id 2022-07-10 17:10:15 -07:00
c130391186 Build Database connection 2022-07-10 17:07:15 -07:00
9c2bd11526 Split out json printing code 2022-07-10 17:01:36 -07:00
685dc13455 Another shot at db shit 2022-07-10 16:53:17 -07:00
1bcbeb098e Log chosen route 2022-07-10 15:24:54 -07:00
8d71846826 cleaning up 2022-07-10 15:19:21 -07:00
3bd1bfc972 Messing with routes 2022-07-09 22:05:01 -07:00
f58e0c074c Make routing more obviously WIP 2022-07-09 19:56:07 -07:00
5fc8b99051 Separate request handling and acceptance 2022-07-09 18:01:03 -07:00
013bc015c5 API Refactoring 2022-07-09 15:43:35 -07:00
ff6d8f8e03 Fix error union compile errors 2022-07-09 15:18:48 -07:00
f86873395b Fix compile errors on parse errors 2022-07-09 15:17:44 -07:00
61c989acde Handle connection cleanup 2022-07-09 15:14:49 -07:00
bb32c2006a Fix method signature for ResponseStream 2022-07-09 15:12:17 -07:00
b1d47ff607 Fix pub 2022-07-09 15:11:05 -07:00
a93039534c Remake basic main.zig handler 2022-07-09 15:07:51 -07:00
c1c5e3014d Fix std.net.StreamServer.Connection ref 2022-07-09 15:04:46 -07:00
04d83a603c HttpServer 2022-07-09 14:18:43 -07:00
21a153ba9d Separate request parsing and server code 2022-07-09 13:09:30 -07:00
fd27199813 Fix ConnectionServer 2022-07-09 12:46:55 -07:00
053de35d33 Add http.Context 2022-07-09 12:41:09 -07:00
8ba0ebd84c Move connection to conn.zig 2022-06-26 00:00:14 -07:00
f5af54e5d1 Handle basic HTTP errors 2022-06-25 23:35:31 -07:00
5e796d3b3d Add request parsing to http lib 2022-06-25 23:03:37 -07:00
f4e8690d28 Add router 2022-06-20 23:04:39 -07:00
7411f5f9b8 Add PathIter 2022-06-02 11:33:16 -07:00
687fd6ef9d Start work on new http pkg 2022-06-08 23:44:36 -07:00
0f7754802d Split util into own package 2022-06-08 22:54:41 -07:00
407923eacd Make handlers return new Response object 2022-05-23 21:58:05 -07:00
004568a907 Add new context object 2022-05-23 21:54:26 -07:00
c141d537c8 Move to using zig master apis 2022-05-23 19:05:28 -07:00
e456a0aa13 Prepare to use new router 2022-05-22 19:37:56 -07:00
9e3cb40fca update names 2022-05-22 13:17:46 -07:00
f2aec8249b Turn routers into functions 2022-05-22 13:07:30 -07:00
b2430b333c Major refactor in router.zig 2022-05-22 12:58:03 -07:00
789e9062b2 Add way to specify route params 2022-05-21 20:22:26 -07:00
c19cc267bf Store path segments instead of path 2022-05-20 22:48:43 -07:00
d885dc5fc8 Match routes by path segments 2022-05-20 02:10:50 -07:00
283b85cfcc Add Route.bind 2022-05-19 21:46:39 -07:00
626a7d33b0 Split out Route into separate fn 2022-05-19 21:25:03 -07:00
c2be0e9833 Make path comparison case-insensitive 2022-05-19 21:13:04 -07:00
64004cbd82 Clean up tests 2022-05-19 21:08:58 -07:00
b24d96233d Test values passed to handler 2022-05-19 20:53:04 -07:00
d4d3226a39 Add http method routing 2022-05-19 20:27:21 -07:00
126ab9a57b Add 404 route 2022-05-19 20:19:54 -07:00
f891aeafa7 Dispatch based on path 2022-05-19 20:16:09 -07:00
c26ca37bc0 Start work on new router 2022-05-19 20:01:16 -07:00
ab471020b7 Add lookupAccountByHandle 2022-05-19 17:42:26 -07:00
2a6154b5ec Stub out account creation 2022-05-15 14:21:34 -07:00
cf8871bbcd Remove unnecessary import 2022-05-13 19:01:45 -07:00
a7e4ff1777 Error on invalid string passed to Uuid.parse 2022-05-12 22:46:34 -07:00
f56782a323 Fix tests for Uuid 2022-05-12 22:41:46 -07:00
bca6a98889 Add tests for ciutf8 2022-05-12 22:33:35 -07:00
d82d271a7f Add tests for Uuid 2022-05-12 22:06:33 -07:00
5353169250 Add Uuid.Nil 2022-05-12 22:05:17 -07:00
ea950dfe4f Generate random IDs on POST 2022-05-12 20:29:18 -07:00
fc704667af Create thread-safe random 2022-05-12 20:28:00 -07:00
b140b20298 Add Uuid.randV4 2022-05-12 20:27:42 -07:00
c484af6179 Create note endpoint 2022-05-12 18:49:26 -07:00
5bd4df8740 Move router.zig 2022-04-24 03:23:08 -07:00
4d18f031a8 Remove circular dependency 2022-04-23 03:18:46 -07:00
6a37685643 Create router.zig 2022-04-23 02:57:49 -07:00
40cad8287a Create http.zig 2022-04-23 00:25:45 -07:00
5eaed13f7a Create util.zig 2022-04-23 00:11:40 -07:00
47353aaf13 Create Uuid type 2022-04-21 02:34:04 -07:00
ddd8b14355 Split out AP stuff 2022-04-20 23:26:08 -07:00
266c18453a Case insensitivity and basic AP user 2022-04-03 20:36:32 -07:00
5fbb1b480b Basic web server 2022-04-02 13:23:18 -07:00