web ui
This commit is contained in:
@ -249,7 +249,7 @@ namespace isnd.Services
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<PackageDeletionReport> DeletePackageAsync(string pkgId, string fullVersion, string pkgType)
|
||||
public async Task<PackageDeletionReport> DeletePackageAsync(string pkgid, string version, string type)
|
||||
{
|
||||
// TODO package deletion on disk
|
||||
var commit = new Commit{
|
||||
@ -258,9 +258,9 @@ namespace isnd.Services
|
||||
};
|
||||
dbContext.Commits.Add(commit);
|
||||
var pkg = await dbContext.PackageVersions.SingleOrDefaultAsync(
|
||||
v => v.PackageId == pkgId &&
|
||||
v.FullString == fullVersion &&
|
||||
v.Type == pkgType
|
||||
v => v.PackageId == pkgid &&
|
||||
v.FullString == version &&
|
||||
v.Type == type
|
||||
);
|
||||
if (pkg == null)
|
||||
{
|
||||
@ -271,5 +271,14 @@ namespace isnd.Services
|
||||
ÛpdateCatalogFor(commit);
|
||||
return new PackageDeletionReport{ Deleted = true, DeletedVersion = pkg };
|
||||
}
|
||||
|
||||
public async Task<PackageVersion> GetPackageAsync(string pkgid, string version, string type)
|
||||
{
|
||||
return await dbContext.PackageVersions.SingleOrDefaultAsync(
|
||||
v => v.PackageId == pkgid &&
|
||||
v.FullString == version &&
|
||||
v.Type == type
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user