Skip to content

Commit

Permalink
Version 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rxtur committed May 26, 2019
1 parent c3d7548 commit d586cee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/Core/Api/AssetsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public AssetsController(IDataService data, IStorageService store)
[HttpGet]
public async Task<AssetsModel> Get(int page = 1, string filter = "", string search = "")
{
var pager = new Pager(page);
var blog = await _data.CustomFields.GetBlogSettings();
var pager = new Pager(page, blog.ItemsPerPage);
IEnumerable<AssetItem> items;

if (string.IsNullOrEmpty(search))
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>2.3.1.8</Version>
<Version>2.4.0.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
24 changes: 10 additions & 14 deletions src/Upgrade/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static void ReplaceFile(string file)
{
if (File.Exists(oldFile))
File.Delete(oldFile);

File.Copy(newFile, oldFile);
_items.Add($"Replacing file: {oldFile} with {newFile}");
}
Expand Down Expand Up @@ -100,28 +100,24 @@ static void ReplaceFolder(string folder)

static List<string> GetCoreFiles()
{
var fileName = $"{_upgDir}{_slash}files.txt";
var files = new List<string>();

var lines = File.ReadAllLines(fileName);
for (var i = 0; i < lines.Length; i++)
{
files.Add(lines[i].Trim());
}
return files;
return ReadFile($"{_upgDir}{_slash}files.txt");
}

static List<string> GetCoreFolders()
{
var fileName = $"{_upgDir}{_slash}folders.txt";
var folders = new List<string>();
return ReadFile($"{_upgDir}{_slash}folders.txt");
}

static List<string> ReadFile(string fileName)
{
var items = new List<string>();
var lines = File.ReadAllLines(fileName);

for (var i = 0; i < lines.Length; i++)
{
folders.Add(lines[i].Trim().Replace("|", _slash));
items.Add(lines[i].Trim().Replace("|", _slash));
}
return folders;
return items;
}
}
}

0 comments on commit d586cee

Please sign in to comment.