Skip to content

Commit

Permalink
Is error checking the error?
Browse files Browse the repository at this point in the history
  • Loading branch information
ShroomAgent27 committed Mar 21, 2024
1 parent 6fa028c commit d548285
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions Pages/SharedEmailPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,10 @@ private async Task<bool> WriteEmail(Email email, bool isSubbing)

using (HttpResponseMessage response = await httpClient.PutAsync(URL, data))
{
var resC = response.Content;
var statusCode = response.StatusCode;

if (resC is not null)
{
_logger.LogInformation((await resC.ReadAsStringAsync()));
return false;
}

_logger.LogInformation("Got status code " + statusCode + ".");
if ((int)statusCode != 200)
{
_logger.LogInformation("Got status code " + statusCode + ".");
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Pages/Subscribe.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p>Email: </p>
<input type="email" , id="email" name="email"><br><br>
<p>Zipcode: </p>
<input type="zipcode" , id="zipcode" name="zipcode"><br><br>
<input type="number" , id="zipcode" name="zipcode"><br><br>
<input type="submit" , value="Submit">
</form>

Expand Down
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ public class Program
public const string WEATHER_API_PROVIDER = "https://provider.weather.shonx.net/";
public const string WEATHER_BACKEND_PROVIDER = "https://backend.weather.shonx.net/";

public const int REVISION = 3;
public const int REVISION = 4;
public static void Main(string[] args)
{
Console.WriteLine("Running revision " + REVISION);
Expand Down

0 comments on commit d548285

Please sign in to comment.