Пример #1
0
 public async Task <ActionResult <ImportedSongListContract> > GetImport(string url, bool parseAll = true)
 {
     try
     {
         return(await _queries.Import(url, parseAll));
     }
     catch (UnableToImportException x)
     {
         return(BadRequest(x.Message));
     }
 }
Пример #2
0
 public async Task <ImportedSongListContract> GetImport(string url, bool parseAll = true)
 {
     try {
         return(await queries.Import(url, parseAll));
     } catch (UnableToImportException x) {
         throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest)
         {
             ReasonPhrase = x.Message
         });
     }
 }