mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Fixed untitled paste title
This commit is contained in:
parent
f15fb73094
commit
54398fbe29
@ -45,7 +45,7 @@ namespace Teknik.Areas.Paste.Controllers
|
|||||||
Models.Paste paste = _dbContext.Pastes.Where(p => p.Url == url).FirstOrDefault();
|
Models.Paste paste = _dbContext.Pastes.Where(p => p.Url == url).FirstOrDefault();
|
||||||
if (paste != null)
|
if (paste != null)
|
||||||
{
|
{
|
||||||
ViewBag.Title = paste.Title + " | Pastebin";
|
ViewBag.Title = (string.IsNullOrEmpty(paste.Title)) ? "Untitled Paste" : paste.Title + " | Pastebin";
|
||||||
ViewBag.Description = "Paste your code or text easily and securely. Set an expiration, set a password, or leave it open for the world to see.";
|
ViewBag.Description = "Paste your code or text easily and securely. Set an expiration, set a password, or leave it open for the world to see.";
|
||||||
// Increment Views
|
// Increment Views
|
||||||
paste.Views += 1;
|
paste.Views += 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user