finished Board Locking
This commit is contained in:
parent
97e4b0026b
commit
6e9be8c931
2 changed files with 18 additions and 1 deletions
|
@ -106,6 +106,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
BoardData b = await BoardsRepository.getBoardByTagAsync(post.Board);
|
||||
if (b.isLocked)
|
||||
{
|
||||
hasErr = true;
|
||||
postErr = "This board is currently locked.";
|
||||
return;
|
||||
}
|
||||
|
||||
bool hasImage = selectedFile != null;
|
||||
if (postUsername == null || postUsername == "")
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
|
||||
<div class="pd centered marg">
|
||||
<RadzenTextBox Placeholder="Title" MaxLength="20" @bind-Value="@postTitle" Class="w-100"/>
|
||||
<RadzenTextBox Placeholder="Title" MaxLength="40" @bind-Value="@postTitle" Class="w-100"/>
|
||||
</div>
|
||||
|
||||
<div class="pd centered marg">
|
||||
|
@ -110,6 +110,15 @@
|
|||
//Maybe redirect to /banned?
|
||||
return;
|
||||
}
|
||||
|
||||
BoardData b = await BoardsRepository.getBoardByTagAsync(board.Tag);
|
||||
if (b.isLocked)
|
||||
{
|
||||
hasErr = true;
|
||||
postErr = "This board is currently locked.";
|
||||
return;
|
||||
}
|
||||
|
||||
foundusr.lastActionTimeStamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
await UsersRepository.updateUserAsync(foundusr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue