mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Add PhotosQuota
This commit is contained in:
parent
0b91fa3367
commit
52b4cc8ada
2 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,7 @@ using Kettu;
|
|||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Serialization;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
@ -32,6 +33,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
User? user = await this.database.UserFromGameRequest(this.Request);
|
||||
if (user == null) return this.StatusCode(403, "");
|
||||
|
||||
if (user.PhotosByMe >= ServerSettings.Instance.PhotosQuota) return this.BadRequest();
|
||||
|
||||
this.Request.Body.Position = 0;
|
||||
string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings
|
|||
}
|
||||
}
|
||||
|
||||
public const int CurrentConfigVersion = 11; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE!
|
||||
public const int CurrentConfigVersion = 12; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE!
|
||||
|
||||
#region Meta
|
||||
|
||||
|
@ -103,6 +103,8 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings
|
|||
|
||||
public int ListsQuota { get; set; } = 50;
|
||||
|
||||
public int PhotosQuota { get; set; } = 500;
|
||||
|
||||
public bool GoogleAnalyticsEnabled { get; set; } = false;
|
||||
|
||||
public string GoogleAnalyticsId { get; set; } = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue