Commit graph

1920 commits

Author SHA1 Message Date
Slendy
a603cdb002
Use Unauthorized instead of Forbid on Website & Api 2023-03-29 21:44:16 -05:00
Slendy
b0858448c8
Fix LBP3 playlist editing 2023-03-29 19:34:16 -05:00
Slendy
8376928a6c
Fix score uploading on story levels 2023-03-29 13:32:48 -05:00
Slendy
86e07fdd9d
Handle null previewSlot in category system 2023-03-29 13:19:01 -05:00
Slendy
6fcc51fca3
Make BackgroundHash not nullable 2023-03-29 13:06:01 -05:00
Slendy
d41b518fc2
Fix heart count on users in-game 2023-03-28 20:25:26 -05:00
Slendy
2924597c7b
Fix published level count in lbp1 2023-03-28 20:20:42 -05:00
Slendy
7ac0a6785d
Fix level missing resource response 2023-03-28 15:33:09 -05:00
Slendy
3ebdc03951
Properly serialize slot resources 2023-03-28 15:19:25 -05:00
Slendy
795a6b9b6e
Set playcount when serializing 2023-03-28 15:02:30 -05:00
Slendy
e3843cb8c4
Fix content-type for planetStats 2023-03-28 14:40:05 -05:00
Slendy
9451babb76
Add null handling to SlotBase 2023-03-28 14:32:49 -05:00
Slendy
7c1d109157
Fix level thumbs up and thumbs down being switched 2023-03-28 14:28:11 -05:00
Slendy
90f79d67c4
Fix level publishing 2023-03-28 14:26:09 -05:00
Slendy
deac39ef97
Fix ScoreboardResponse returning points as count 2023-03-28 14:03:35 -05:00
Slendy
65e1ffc993
Fix photo dates in-game 2023-03-28 11:18:24 -05:00
Slendy
1e8ef8c679
Serialization refactor hotfixes
Fixes user heart count
Fixes searches not working
Fixes text/plain content not outputting
2023-03-28 10:33:03 -05:00
Josh
329ab66043
Refactor serialization system (#702)
* Initial work for serialization refactor

* Experiment with new naming conventions

* Mostly implement user and slot serialization.
Still needs to be fine tuned to match original implementation
Many things are left in a broken state like website features/api endpoints/lbp3 categories

* Fix release building

* Migrate scores, reviews, and more to new serialization system.
Many things are still broken but progress is steadily being made

* Fix Api responses and migrate serialization for most types

* Make serialization better and fix bugs
Fix recursive PrepareSerialization when recursive item is set during root item's PrepareSerialization, items, should be properly indexed in order but it's only tested to 1 level of recursion

* Fix review serialization

* Fix user serialization producing malformed SQL query

* Remove DefaultIfEmpty query

* MariaDB doesn't like double nested queries

* Fix LBP1 tag counter

* Implement lbp3 categories and add better deserialization handling

* Implement expression tree caching to speed up reflection and write new serializer tests

* Remove Game column from UserEntity and rename DatabaseContextModelSnapshot.cs back to DatabaseModelSnapshot.cs

* Make UserEntity username not required

* Fix recursive serialization of lists and add relevant unit tests

* Actually commit the migration

* Fix LocationTests to use new deserialization class

* Fix comments not serializing the right author username

* Replace all occurrences of StatusCode with their respective ASP.NET named result
instead of StatusCode(403) everything is now in the form of Forbid()

* Fix SlotBase.ConvertToEntity and LocationTests

* Fix compilation error

* Give Location a default value in GameUserSlot and GameUser

* Reimplement stubbed website functions

* Convert grief reports to new serialization system

* Update DatabaseModelSnapshot and bump dotnet tool version

* Remove unused directives

* Fix broken type reference

* Fix rated comments on website

* Don't include banned users in website comments

* Optimize score submission

* Fix slot id calculating in in-game comment posting

* Move serialization interfaces to types folder and add more documentation

* Allow uploading of versus scores
2023-03-28 00:39:54 +00:00
Dagg
307b2135a3
Potentially fix score sorting issue (#721)
Update SlotPage.cshtml.cs

lel
2023-03-27 23:34:12 +00:00
dependabot[bot]
2738d04dbb
Bump Selenium.WebDriver from 4.8.1 to 4.8.2 (#718)
Bumps Selenium.WebDriver from 4.8.1 to 4.8.2.

---
updated-dependencies:
- dependency-name: Selenium.WebDriver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 23:22:45 +00:00
Josh
b2a1d3958f
Allow head requests to status endpoints (#717) 2023-03-24 00:31:56 +00:00
Josh
fa5ff0b490
Add a discord webhook for when users join for the first time. (#698)
* Add a discord webhook for when users join for the first time.

* Fix compilation error related to embed colors

* Make config migration backup use the version of the stored file

* Make DiscordConfiguration not halt startup

* Allow the registration message to be configured

* Clean up registration announcement and add userId variable

* Fix userid resolution and convert newline string to actual character
Also make WebhookHelper not fail if all destinations aren't configured
2023-03-23 00:57:28 +00:00
Josh
b87c16ab7c
Make in-game email system not lock after one attempt (#712) 2023-03-18 20:33:37 -05:00
W0lf4llo
9b014fa01c
StasticsHelper + Community Tab Performance Fix (#713)
* Player count shows per game

* Fixed LBP3 categories lagigng & StatisticsHelper

Co-authored-by: koko <sudokoko@users.noreply.github.com>

* Fixed "planetStats" mmPicksCount

* Hopefully the final update to this PR!
(Bug fixes)

* Update ProjectLighthouse/Types/Entities/Level/Slot.cs

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

I'm trusting you that nothing breaks here lol

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

bad slendy >:(

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

---------

Co-authored-by: koko <sudokoko@users.noreply.github.com>
Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2023-03-17 03:51:55 +00:00
dependabot[bot]
14e40de18f
Bump Microsoft.EntityFrameworkCore.Design from 7.0.3 to 7.0.4 (#711)
Bumps [Microsoft.EntityFrameworkCore.Design](https://github.com/dotnet/efcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore.Design
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 20:31:30 +00:00
dependabot[bot]
740439bb82
Bump Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore from 7.0.3 to 7.0.4 (#706)
Bump Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore

Bumps [Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 20:28:14 +00:00
dependabot[bot]
408bdc85e7
Bump Microsoft.AspNetCore.Mvc.Testing from 7.0.3 to 7.0.4 (#710)
Bumps [Microsoft.AspNetCore.Mvc.Testing](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Testing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 19:56:45 +00:00
dependabot[bot]
1f45195040
Bump Microsoft.EntityFrameworkCore from 7.0.3 to 7.0.4 (#709)
Bumps [Microsoft.EntityFrameworkCore](https://github.com/dotnet/efcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 19:46:21 +00:00
dependabot[bot]
6198521356
Bump Selenium.WebDriver.ChromeDriver from 109.0.5414.7400 to 111.0.5563.6400 (#700)
Bump Selenium.WebDriver.ChromeDriver

Bumps [Selenium.WebDriver.ChromeDriver](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver) from 109.0.5414.7400 to 111.0.5563.6400.
- [Release notes](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/releases)
- [Changelog](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/compare/v.109.0.5414.7400...v.111.0.5563.6400)

---
updated-dependencies:
- dependency-name: Selenium.WebDriver.ChromeDriver
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 14:46:11 -05:00
dependabot[bot]
9dc889d192
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.3 to 7.0.4 (#707)
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Bumps [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:40 +00:00
dependabot[bot]
c0298d9148
Bump Redis.OM from 0.4.1 to 0.4.2 (#705)
Bumps [Redis.OM](https://github.com/redis/redis-om-dotnet) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/redis/redis-om-dotnet/releases)
- [Commits](https://github.com/redis/redis-om-dotnet/compare/v0.4.1...v0.4.2)

---
updated-dependencies:
- dependency-name: Redis.OM
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:23 +00:00
dependabot[bot]
e53b91870d
Bump YamlDotNet from 13.0.1 to 13.0.2 (#704)
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](https://github.com/aaubry/YamlDotNet/compare/v13.0.1...v13.0.2)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:11 +00:00
koko
05b71b0d22
Add admin/mod badges on UserCardPartial (#697)
* Add admin/mod badges to UserCardPartial

* Correct vertical alignment of badges

* Move most of styling to stylesheet, lazy but it works

* Implement more modular role coloring for UserLinkPartial and UserCardPartial

---------

Co-authored-by: Slendy <josh@slendy.pw>
2023-03-10 21:17:44 +00:00
Slendy
223cc0c883
Add default values for dive in slot 2023-03-08 15:26:21 -06:00
dependabot[bot]
e47ac3d06a
Bump SixLabors.ImageSharp from 2.1.3 to 3.0.0 (#693)
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 2.1.3 to 3.0.0.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v2.1.3...v3.0.0)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2023-03-05 07:28:22 +00:00
Slendy
9d25f56e64
Fix hearted and queued levels on LBP Vita 2023-03-04 21:41:49 -06:00
Josh
e3dcbe75e1
Allow environment variable expansion in config files (#689)
* Allow environment variable expansion in config files

* Remove extra newline
2023-02-26 10:45:57 +00:00
Slendy
d18bad9f05
Fix RoomHelper duplicate key errors 2023-02-26 03:58:49 -06:00
Slendy
a2d2337dc3
Fix photo uploading and add more detailed logging to deserialization 2023-02-24 20:17:44 -06:00
Slendy
c48da8ccd7
Fix ownership check in docker entrypoint script 2023-02-24 00:45:05 -06:00
Slendy
78dd5b6489
Add KnownProxies in appsettings for load balancers/docker 2023-02-24 00:28:36 -06:00
Josh
017dcd6888
Make PhotoSubjects use a one to many relationship (#687)
* Attempt to remodel PhotoSubject and Photo relationship

* Fix migration name

* Use exactName for migration lock

* Revert "Use exactName for migration lock"

This reverts commit 76cee6a3ff.

* Set command timeout to 5 minutes for database migrations

* Delete unused PhotoSubjects in migration

* Clean up website queries and finalize subject refactor

* Add migration to remove PhotoSubjectCollection

* Add grace period for container startup and optimize startup

* Make config backup copy original file

* Allow docker entrypoint to fix data permissions
2023-02-24 04:20:55 +00:00
Josh
35ea2682b9
Replace Location table with packed 64-bit int (#679)
* Replace Location table with packed 64 bit int

* Remove double Include and fix Slot documentation

* Fix compilation errors from merge

* Fix namespaces and add expected values to unit tests
2023-02-21 14:53:38 -06:00
dependabot[bot]
575d2b7be7
Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.5.0 (#685)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.4.1 to 17.5.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.4.1...v17.5.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 20:42:03 +00:00
koko
155988a940
Add a contributor code of conduct (#686)
* Add a contributor code of conduct

* Add link to Discord for contact method
2023-02-21 20:41:56 +00:00
dependabot[bot]
009f679c81
Bump BouncyCastle.Cryptography from 2.0.0 to 2.1.1 (#681)
Bumps [BouncyCastle.Cryptography](https://github.com/bcgit/bc-csharp) from 2.0.0 to 2.1.1.
- [Release notes](https://github.com/bcgit/bc-csharp/releases)
- [Commits](https://github.com/bcgit/bc-csharp/compare/release-2.0.0...release-2.1.1)

---
updated-dependencies:
- dependency-name: BouncyCastle.Cryptography
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 17:31:15 +00:00
dependabot[bot]
e799c236c1
Bump YamlDotNet from 13.0.0 to 13.0.1 (#682)
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](https://github.com/aaubry/YamlDotNet/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 17:22:12 +00:00
dependabot[bot]
8833788e4c
Bump Selenium.WebDriver from 4.8.0 to 4.8.1 (#683)
Bumps Selenium.WebDriver from 4.8.0 to 4.8.1.

---
updated-dependencies:
- dependency-name: Selenium.WebDriver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 17:22:04 +00:00
Zaprit
e483d325ae
User Search API (#680)
* Added User Search API

* Applied limit to user search

* Update ProjectLighthouse.Servers.API/Controllers/UserEndpoints.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.API/Controllers/UserEndpoints.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.API/Controllers/UserEndpoints.cs

Co-authored-by: Josh <josh@slendy.pw>

* 1 line fix, woo!

---------

Co-authored-by: Josh <josh@slendy.pw>
2023-02-20 04:37:37 +00:00
Slendy
8030301739
Fix mismatched game version map 2023-02-18 15:23:15 -06:00