mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-13 10:38:08 +00:00
Refactor notification support (#2363)
* Add teams notifications * . * Fix compilation isues * Checkpoint * Added Ado * Fix some TODOs * Teams messages work! 🎉 * fmt * Bug fix container url generator * Some small ado changes * 🧹 * PR comments * Fix packages * Get more detailed restore information to debug errors * Maybe fixes this issue? * Undo CI change
This commit is contained in:
@ -29,6 +29,8 @@ public interface IContainers {
|
||||
|
||||
public Async.Task<Uri> AddContainerSasUrl(Uri uri, TimeSpan? duration = null);
|
||||
public Async.Task<Dictionary<Container, IDictionary<string, string>>> GetContainers(StorageType corpus);
|
||||
|
||||
public string AuthDownloadUrl(Container container, string filename);
|
||||
}
|
||||
|
||||
public class Containers : IContainers {
|
||||
@ -215,4 +217,14 @@ public class Containers : IContainers {
|
||||
|
||||
return new(data.SelectMany(x => x));
|
||||
}
|
||||
|
||||
public string AuthDownloadUrl(Container container, string filename) {
|
||||
var instance = _config.OneFuzzInstance;
|
||||
|
||||
var queryString = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||
queryString.Add("container", container.String);
|
||||
queryString.Add("filename", filename);
|
||||
|
||||
return $"{instance}/api/download?{queryString}";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user