mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added check to deletion to handle git accounts not existing.
This commit is contained in:
parent
99378c6e30
commit
16099529d1
@ -398,10 +398,14 @@ namespace Teknik.Areas.Profile.Controllers
|
||||
return Json(new { error = "Unable to delete git account. Http Exception: " + htex.Message });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// This error signifies the user doesn't exist, so we can continue deleting
|
||||
if (ex.Message != "The remote server returned an error: (404) Not Found.")
|
||||
{
|
||||
return Json(new { error = "Unable to delete git account. Exception: " + ex.Message });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update uploads
|
||||
List<Upload.Models.Upload> uploads = db.Uploads.Include("User").Where(u => u.User.Username == User.Identity.Name).ToList();
|
||||
|
Loading…
Reference in New Issue
Block a user