Commit Graph

192 Commits

Author SHA1 Message Date
Daniel López Guimaraes
2eb969c0f1
Simplify check a bit
We don't have to assert the string array, as it could be undefined and
we can handle that.
2023-06-29 20:59:19 +01:00
Daniel López Guimaraes
3a71193ff8
Add support for search_key to be string, not array
The `search_key` parameter isn't always going to be a string array, but
it can be a single string. Support both cases accordingly.
2023-06-29 19:55:02 +01:00
Jemma Poffinbarger
5f85f65bfc Updated topics endpoint to prevent sub-communities and user generated communities from being displayed 2023-06-24 14:23:22 -05:00
Jemma Poffinbarger
3f6b0a7aa8 Fixed new posts always being marked as a spoiler. Fixed safe validation failing when a post body was not present when sending a painting 2023-06-13 18:10:44 -05:00
Jonathan Barrow
ba066f1c18
calculateMostPopularCommunities is now more clear and faster 2023-06-13 17:07:17 -04:00
Jemma Poffinbarger
bcb5992ae3 Increased the expiration time for topics from 1 day to 2 days 2023-06-12 17:48:03 -05:00
Jonathan Barrow
9470efe786
updated token format 2023-06-11 07:59:24 -04:00
EpicUsername12
acd9a211f2 Removed 'await' on respondCommunityNotFound() calls 2023-06-01 20:51:29 +02:00
EpicUsername12
0c46b33be6 Separated /v1/communities/%s route to multiple routes 2023-06-01 20:33:37 +02:00
EpicUsername12
3ef566789e Hydrate Post documents on the aggregation path of `/v1/communities/%s/posts` 2023-05-30 19:28:35 +02:00
EpicUsername12
9df8d3f29d Updated POST /v1/communities/%s:
- Implemented ``/v1/communities/%s`` (update user-made sub community)
- Implemented ``/v1/communities/%s.delete`` (delete user-made sub community)
- Implemented ``/v1/communities/%s.favorite``
- Implemented ``/v1/communities/%s.unfavorite``
2023-05-30 18:06:51 +02:00
EpicUsername12
6c592fbd1d Changed Model type back to interface 2023-05-27 00:34:54 +02:00
EpicUsername12
04db683c45 Improved GET and POST /v1/communities
- Added an optional 'owner' field to "Communities"

This is because Miiverse allowed user-made communities (4 per games)

- Added a subcommunity query

'parent' mandatory field to get all subcommunities belonging to a specific parent community

'owner' optional field to comply with 'my' query type

'olive_community_id' optional array field to comply with 'favorite' query type, you would feed this field the user favorite sub communities ID

- Fixed CommunitySchema 'json()' method for base64 fields

- Fixed getCommunityByTitleIDs(), there is no field 'title_ids' in the schema
2023-05-26 20:24:49 +02:00
Jonathan Barrow
5a4a4a4c83
Updated token parsing 2023-05-01 15:03:29 -04:00
Jonathan Barrow
56f248981e
Use new account server token format 2023-04-28 17:02:06 -04:00
Jonathan Barrow
9a25a7a9a2
Added test and dev subdomains to discovery 2023-04-28 16:36:20 -04:00
Jonathan Barrow
436e5f3bd9
Removed account server DB, now uses gRPC 2023-04-28 14:13:03 -04:00
Jonathan Barrow
1b76eb967b
Added missing Settings.json method 2023-04-26 12:20:23 -04:00
Jonathan Barrow
26f309e2b9
Fixed /v1/people crashing when distinct_pid=1 2023-04-26 12:04:27 -04:00
Jonathan Barrow
d68f0c37d9
Added separateArrayItems: true to XML generation for responses with lists 2023-04-26 11:17:48 -04:00
Jonathan Barrow
4c61c89fd7
Move error 16 directly after error 15 in auth middleware 2023-04-26 11:13:15 -04:00
Jonathan Barrow
7ef9147c6c
Add topics to topics list 2023-04-26 11:12:20 -04:00
Jemma Poffinbarger
a8d57fb487 Added xml errors to communities.ts 2023-04-26 00:23:29 -05:00
Jemma Poffinbarger
cf7c71f40b Added individual errors in the auth middleware 2023-04-25 23:09:22 -05:00
Jonathan Barrow
6f0f9dcf4d
Renamed appID to communityID in communities/:id/posts to better match usage 2023-04-25 16:01:54 -04:00
Jonathan Barrow
dc040731bb
Added optional remaster_version field to ParamPack 2023-04-25 15:57:14 -04:00
Jonathan Barrow
ea41488347
Added missing result elements to some responses 2023-04-25 15:01:46 -04:00
Jonathan Barrow
d1fb023869
Removed unused XML parsing middleware 2023-04-25 09:34:38 -04:00
Jonathan Barrow
6e86498981
Added types to modules without types 2023-04-24 23:37:36 -04:00
Jonathan Barrow
28651873d7
Removed object-to-xml in favor of only using xmlbuilder 2023-04-24 16:37:18 -04:00
Jonathan Barrow
4664d9fe05
Removed XMLResponseGenerator class in favor of Mongoose Schema methods 2023-04-24 16:29:04 -04:00
Jonathan Barrow
c869b3ae36
Moved generatePostUID to Model method to prevent possible ID collisions 2023-04-24 11:57:15 -04:00
Jonathan Barrow
4ae2317c83
Use Model.create instead of new Model with Mongoose 2023-04-24 11:25:38 -04:00
Jonathan Barrow
4de3856a25
use response.status() method and not response.statusCode setter 2023-04-24 11:12:44 -04:00
Jonathan Barrow
05ba27793a
Always set content-type for all routes & use response.type method 2023-04-24 11:10:29 -04:00
Jonathan Barrow
72285ee221
Cleaner server start function 2023-04-23 19:55:54 -04:00
Jonathan Barrow
37d14b16d5
split api and discovery services 2023-04-23 19:51:58 -04:00
Jonathan Barrow
d45f6d1104
Fixed linting issues 2023-04-23 19:43:28 -04:00
Jonathan Barrow
106b581fe3
Full conversion to TypeScript 2023-04-23 19:32:42 -04:00
Jonathan Barrow
c13383812e
Updated logger and logs path 2023-04-22 17:11:23 -04:00
Jonathan Barrow
442c20ed67
Fixed build failures 2023-04-22 17:09:21 -04:00
Jonathan Barrow
93008c5a1a
Removed JSON config, moved to env vars 2023-04-22 11:03:51 -04:00
Jonathan Barrow
f70cd34406
Barebones move to TypeScript 2023-04-22 10:17:33 -04:00
EpicUsername12
75b3b1d6b1 Forgot to await the community save() 2023-04-20 06:04:49 +02:00
EpicUsername12
7eaede2fee Removed log 2023-04-20 03:40:31 +02:00
EpicUsername12
70697b93f0 Base 'POST: /v1/communities' 2023-04-20 03:40:05 +02:00
EpicUsername12
7c0770b330 Early version of /v1/communities 2023-04-20 03:21:34 +02:00
Jemma Poffinbarger
6d2eef8b0f Fixed in-game messages creating broken conversations 2023-04-17 23:59:25 -05:00
Jemma Poffinbarger
aeb07a2f38 Fixed topics and communities response 2023-04-16 18:18:16 -05:00
Jemma Poffinbarger
58f11a21b1 Fixed /v1/topics timing out. Updated post ID length 2023-04-16 16:13:32 -05:00
Jemma Poffinbarger
9acc8b13f4 Updated schema. Fixed request for friends not working. Added check to discovery server on auth to reject other requests when discovery is closed. 2023-04-16 02:36:21 -05:00
Jemma
f50bf61abf Updated post ID format and removed legacy methods on post model 2023-04-14 14:37:32 -05:00
Jemma
bd855421c2 Added support for getting posts from friends in /v1/people 2023-04-12 10:30:00 -05:00
Jemma
831fcb2bc0 Added friends list request. Refactored util document. Code cleanup 2023-04-12 10:13:51 -05:00
Jemma Poffinbarger
6aa22c8c31 Added support for 'type=memo' flag in community posts 2023-04-10 22:01:10 -05:00
Jemma Poffinbarger
448736d4ae Added support for topic tags. fixed parent community id's not being strings (???) 2023-04-06 22:39:49 -05:00
Jemma
0c3903035c
Update communities.js 2023-04-06 02:10:01 -05:00
Jemma Poffinbarger
32ea68b549 Adjusted parameters for /v1/people response. Check for empty post content. Re-enable support for WWP 2023-04-06 01:16:22 -05:00
Jemma Poffinbarger
1d64d7621f Fixed bugs in some xml responses for communities and posts. Added support for /v1/people endpoints. Added support for more search queries in posts requests. Fixed country_id not being stored in posts 2023-04-05 22:41:08 -05:00
Jemma
0bab90ed09 Added updated query for topics to update based on recent posts in communities 2023-04-04 20:46:28 -05:00
Jemma
e35ceeb4b4 Refactored xml generation class to be more streamlined. Added support for storing screenshot length in database. 2023-04-04 20:17:13 -05:00
Jemma
3b1db444e6 Added /v1/posts.search endpoint 2023-04-04 18:51:11 -05:00
Jemma Poffinbarger
3d9104eca2 Fixed communities request for AC Plaza. Fixed replies endpoint timing out when requesting replies that did not contain app data 2023-04-01 22:02:23 -05:00
Jemma Poffinbarger
6a61f9e0bc Fixed communities request. Added support for post replies. 2023-03-30 23:51:15 -05:00
Jemma Poffinbarger
e896483001 Fixed app_id query not being assigned to another in the new post endpoint 2023-03-26 13:52:26 -05:00
Jemma Poffinbarger
397c51cc29 Updated community requests to use app ID when searching for posts first, then the community ID. Added additional check to ensure empathy does not go below 0. Added endpoint to mark post as removed. Updated post endpoint to attempt to get the community in the following priority order: community_id -> app_id -> title_id. Updating logging for token parsing issues 2023-03-26 13:22:28 -05:00
Jemma Poffinbarger
04328fe487 added support for fetching community posts with non-standard community ID 2023-03-26 12:14:09 -05:00
poffinbargej
8e37511331 Updated discovery version to 1 (sorry shutter :p) 2023-03-24 10:31:40 -05:00
Jemma
c6a8d8dba9 removed auth bypass for topics endpoint 2023-03-23 22:15:50 -05:00
Jemma
a7d28f155b Added topics flag to database 2023-03-23 22:05:31 -05:00
Jemma Poffinbarger
a0a5e3d32c Fixed crashing on Nintendo Land. Fixed community post responses and app data parsing. Added cache to WWP to (hopefully) help with some performance issues. 2023-03-21 23:46:08 -05:00
Jemma Poffinbarger
71245c41b3 Finished implementing sub-community support. Added support for the followed users endpoint. Fixed a number of inconsistencies in different endpoints. Fixed messages sent via the API not storing the correct Mii face URL. General code cleanup. 2023-03-20 21:40:55 -05:00
Jemma Poffinbarger
a3799e8a11 Fixed in-game posts from not displaying. Fixed submitting drawing posts in game. Updated dependencies 2023-03-05 17:15:19 -06:00
Jemma Poffinbarger
2ed94634eb updated post body filter 2022-11-19 21:11:07 -06:00
Jemma Poffinbarger
f3aba68423 Updated auth flow to properly route discovery traffic when the user is signed in 2022-11-19 14:34:05 -06:00
CaramelKat
57a7c698fc Added filter to prevent invalid characters from showing up in the body of API responses 2022-10-03 21:30:26 -05:00
CaramelKat
ec9664d125 Updated to support removed post flag. updated title id's variable for topics and posts requests 2022-09-19 21:36:17 -05:00
Jemma Poffinbarger
dae68dfc67 Fixed post ID's not working in WaraWara. Added status endpoint to check server status 2022-09-17 19:52:43 -05:00
Jemma Poffinbarger
a33b30af63 Updated auth to let discovery work without a param pack. Began implemented users endpoint. Added missing parameters to the message object 2022-09-17 17:35:49 -05:00
CaramelKat
a13a817919 Fixed posting error from games 2022-09-05 09:13:17 -05:00
Jemma Poffinbarger
ae9649d72a Temporally disabled friend messages until a replacement dependency can be tested and implemented to prevent a server crash 2022-08-31 20:04:04 -05:00
CaramelKat
035c4e0a23 This was too long in the making, and I've already made too many changes to list here. The Great rewrite begins! 2022-08-28 20:45:09 -05:00
mrjvs
33f6f33154 modify code to support config.json in root of repo 2022-05-08 15:37:25 +02:00
mrjvs
0606435ce0 add docker files and remove static config.json 2022-05-08 15:35:27 +02:00
CaramelKat
a161df8925 Added additional check when someone attempts to post to Announcements 2021-12-09 12:28:42 -06:00
CaramelKat
be8c009b2a Cleaned up old files from the repository. (hopefully) fixed the memory leak problem. Fixed pfp urls being incorrect 2021-11-30 18:55:20 -06:00
CaramelKat
02a03ed1f5 Fixed splatoon communities 2021-10-17 19:02:32 -05:00
CaramelKat
518a301aad Actually fixed Access Token decryption 2021-10-17 11:21:42 -05:00
CaramelKat
191c9013ea Updated Access Token decryption function 2021-10-14 19:46:57 -05:00
CaramelKat
66906ebc0a changed topics cache expiration to 2 days instead of 1 2021-09-28 23:41:08 -05:00
CaramelKat
274a64f4a1 added filter for newline characters in topics body and paintings 2021-09-28 22:27:24 -05:00
CaramelKat
7175e20364 added support for /v1/topics 2021-09-28 21:23:13 -05:00
CaramelKat
9221ab4851 added support for verified user posts 2021-09-18 19:33:56 -05:00
CaramelKat
d0c1f45bc9 Updated POST model 2021-09-06 03:18:23 -05:00
CaramelKat
a9828d89ed Fixed posting in portal, added support for video posts 2020-05-22 02:50:08 -05:00
CaramelKat
1e7add9597 Implemented basic support in Portal for User Page, Activity Feed, Communities, Messages, and Notifications 2020-05-21 23:11:56 -05:00
CaramelKat
2917b9d25c split portal into multiple files to help with load times 2020-05-21 03:12:56 -05:00
CaramelKat
df3eb4201d fixed screenshot crash, added support for displaying screenshot posts 2020-05-21 02:04:15 -05:00
CaramelKat
e1c5228562 fixed image loading and posting from the correct community in portal 2020-05-21 01:24:03 -05:00
CaramelKat
ee75a4e201 added posting from portal 2020-05-21 01:04:58 -05:00