Commit Graph

96 Commits

Author SHA1 Message Date
Ske
d596cbc4e8 Clean up privacy handling in API 2020-02-13 23:11:21 +01:00
Ske
bef3f5c79a Merge branch 'api-privacy' of https://github.com/greysdawn/PluralKit into greysdawn-api-privacy 2020-02-13 22:55:10 +01:00
Ske
6d5004bf54 Large refactor and project restructuring 2020-02-12 15:16:19 +01:00
Ske
fde03538e0 Fix API token handling 2020-02-01 22:17:13 +01:00
Ske
1ea0526ef8 Migrate DI container to Autofac 2020-01-26 01:27:45 +01:00
Ske
b347d2d557 Add front history pagination; upgrade more store methods 2020-01-18 00:58:35 +01:00
Ske
8a689ac0f2 Upgrade various store methods to IAsyncEnumerable 2020-01-18 00:02:17 +01:00
Ske
98613c4287 Add system and member privacy support 2020-01-11 16:51:13 +01:00
Ske
0f22285824 Upgrade API serialisation code to enable potential context-based serialisation 2019-12-28 15:52:59 +01:00
Ske
ebc688ae54 Add original message ID to API response 2019-12-22 12:54:37 +01:00
Ske
9c9e48a799 Upgrade to .NET Core 3.1 2019-12-22 00:40:57 +01:00
Ske
55f77df39e Fix bounds checks and normalise nulls in API 2019-12-02 16:49:39 +01:00
Ske
d6edbe8e8d Fix PATCHing members with one-sided proxy tags 2019-11-03 19:16:06 +01:00
Ske
49dc25ee02 Allow keeping proxy tags when proxying messages.
Required database migration:

Closes #75.
2019-10-30 09:26:50 +01:00
Ske
393ee16c1b Add support for multiple proxy tags
Tangentially closes #103.
2019-10-30 08:18:59 +01:00
Ske
6a73b3bdd6 Refactor data stores, merging the Store classes 2019-10-26 19:45:44 +02:00
Noko
397da2e1fa Added max member count to limits
A given system can now have up to 1000 members. Within 50 members of that limit, a warning will display whenever a new member is created via the bot. Once the limit is reached, a final warning will appear indicating that no additional members can be created unless members are first deleted. Attempting to create a new member at that point by any method will result in an error message indicating that the limit has been reached.

Respecting this in pk;import required some restructuring to tease apart which members already exist and which ones need to be created prior to creating any members as it seems preferable to fail early and give the user the ability to intervene rather than pushing the system to the member cap and requiring manual deletion of "lower priority" members before others can be created. One consequence of the restructure is that existing members are being read in bulk which is a performance improvement of 25-70% depending on how many switches need to be imported (the more members you have, the more noticeable this is).
2019-10-20 02:16:57 -05:00
Astrid
af4da8fd72
Merge branch 'master' into patch-2 2019-10-18 13:37:09 +02:00
Ske
49dede7ff8 Remove compiler warning from API 2019-10-18 13:19:17 +02:00
Ske
5f79aaf960 Fix API service injection 2019-08-12 06:54:28 +02:00
Ske
7e92a58c8d Fix API project building 2019-08-11 22:59:05 +02:00
Grey Himmel
d38c38cb9e
Add display name editing
- Set display name during member POST
- Update display name during member PATCH
2019-08-09 11:37:52 -04:00
Grey Himmel
1cfeaf281b Await member delete 2019-08-09 12:55:40 +02:00
Grey Himmel
13fe0b7ef9 Add endpoint to delete members
- Add endpoint to delete members through a DELETE request
2019-08-09 12:55:40 +02:00
Grey Himmel
ef68a5250f Return member after create/edit
Changing the POST and PATCH routes to return the member that's been created/edited, similar to how it worked before. Makes it easier to compare changes and get a newly created member's ID
2019-07-28 23:23:48 +02:00
xBelladonna
924924b10e Add endpoint to create new member by POST request 2019-07-27 12:56:35 +02:00
Ske
d5c0856abf Fix bounds checking on member patch endpoint 2019-07-19 18:36:47 +02:00
Ske
0b4335ccaa Add logger to API service setup 2019-07-18 17:26:06 +02:00
Ske
483611702e Fix error when switching with no previous switches 2019-07-18 12:09:19 +02:00
Ske
ca73a215c8 Add endpoint for querying messages by ID 2019-07-17 14:05:44 +02:00
Ske
e28ed585ce Add endpoint for querying systems by Discord snowflake 2019-07-17 13:45:52 +02:00
Bella | Nightshade
1c48cb2fc7 Send CORS allowed headers in API response (#114)
Sends Access-Control-Allow-Headers Content-Type and Authorization in the API response headers
2019-07-17 13:39:07 +02:00
Ske
a188c64a0e Clean up unused imports 2019-07-17 13:38:23 +02:00
Ske
e0a93ba608 Enable CORS for the API 2019-07-16 14:20:25 +02:00
Ske
29180bcd2e Fix broken member info endpoint 2019-07-16 12:14:48 +02:00
Ske
39152dbd27 Add an endpoint to view your own system 2019-07-15 20:06:28 +02:00
Ske
cc31664f8b Fix API port binding hopefully for good 2019-07-15 19:08:47 +02:00
Ske
cabbae0679 Have Kestrel listen on any IP 2019-07-15 18:09:14 +02:00
Ske
4450826241 Disable HTTPS redirection on API server 2019-07-15 17:58:05 +02:00
Ske
ebc311ecc3 Remove message query reaction AND open DB connection when obtaining one 2019-07-14 05:23:27 +02:00
Ske
d829630a35 Fix database connection pool contention (maybe)
Instead of acquiring a connection per service per request, we
acquire connections more often but at a more granular level, meaning
they're also disposed of more quickly instead of staying for a long time
in case of long-running commands or leaks.
2019-07-11 21:25:23 +02:00
Ske
641532daec Fix API system fronter endpoint crashing on system with no switches 2019-07-10 12:54:54 +02:00
Ske
802eeb8d39 Version API endpoints 2019-07-10 00:23:41 +02:00
Ske
204404bd8d Bounds check system details 2019-07-10 00:21:00 +02:00
Ske
9a5152a74c Add member routes to API 2019-07-10 00:19:18 +02:00
Ske
4874879979 Add basic API, only with system endpoints 2019-07-09 20:39:29 +02:00