Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Add a description to manifest.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anduin2017 committed Nov 13, 2019
1 parent 5e72ff9 commit 2ab5a9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Controllers/ApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace Aiursoft.Blog.Controllers
Expand All @@ -29,10 +30,12 @@ public async Task<IActionResult> Manifest()
{
var owner = (await _userManager.GetUsersInRoleAsync(Consts.OwnerRoleName))
.First();
var descriptionAttribute = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyDescriptionAttribute>().Description;
var model = new ManifestModel
{
ShortName = owner.NickName,
Name = owner.NickName + "'s Blog",
Description = descriptionAttribute,
StartUrl = "/",
Icons = new List<ManifestIcon>()
{
Expand Down
4 changes: 1 addition & 3 deletions src/Models/ManifestModel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Aiursoft.Blog.Models
{
Expand All @@ -26,6 +23,7 @@ public class ManifestModel

public string Display { get; set; }
public string Orientation { get; set; }
public string Description { get; set; }
}

public class ManifestIcon
Expand Down

0 comments on commit 2ab5a9e

Please sign in to comment.