mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #456 from wabbajack-tools/404-on-no-archive
Return a 404 (instead of an exception) when an archive isn't indexed
This commit is contained in:
commit
3a0e4c39cf
@ -92,6 +92,8 @@ namespace Wabbajack.BuildServer.Controllers
|
||||
public async Task<IActionResult> GetFile(string xxHashAsBase64)
|
||||
{
|
||||
var result = await _sql.AllArchiveContents(BitConverter.ToInt64(xxHashAsBase64.FromHex()));
|
||||
if (result == null)
|
||||
return NotFound();
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace Wabbajack.BuildServer.Model.Models
|
||||
}
|
||||
return new List<IndexedVirtualFile>();
|
||||
}
|
||||
return Build(0).First();
|
||||
return Build(0).FirstOrDefault();
|
||||
}
|
||||
|
||||
public async Task IngestAllMetrics(IEnumerable<Metric> allMetrics)
|
||||
|
Loading…
Reference in New Issue
Block a user