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
This commit is contained in:
Josh 2023-02-23 22:20:55 -06:00 committed by GitHub
parent 35ea2682b9
commit 017dcd6888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 240 additions and 210 deletions

View file

@ -54,9 +54,7 @@ public class ClientConfigurationController : ControllerBase
[Produces("text/xml")]
public async Task<IActionResult> GetPrivacySettings()
{
GameToken token = this.GetToken();
User? user = await this.database.UserFromGameToken(token);
User? user = await this.database.UserFromGameToken(this.GetToken());
if (user == null) return this.StatusCode(403, "");
PrivacySettings ps = new()
@ -72,7 +70,7 @@ public class ClientConfigurationController : ControllerBase
[Produces("text/xml")]
public async Task<IActionResult> SetPrivacySetting()
{
User? user = await this.database.UserFromGameRequest(this.Request);
User? user = await this.database.UserFromGameToken(this.GetToken());
if (user == null) return this.StatusCode(403, "");
PrivacySettings? settings = await this.DeserializeBody<PrivacySettings>();