Skip to content

Commit

Permalink
working on the last error
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed Feb 24, 2024
1 parent d745a18 commit 513d070
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions changed.d
Original file line number Diff line number Diff line change
Expand Up @@ -392,23 +392,23 @@ GithubIssue[] getGithubIssuesRest(const string project, const string repo
{
GithubIssue tmp;
{
JSONValue* mem = "number" in it;
const(JSONValue)* mem = "number" in it;
enforce(mem !is null, it.toPrettyString()
~ "\nmust contain 'number'");
enforce((*mem).type == JSONType.integer, (*mem).toPrettyString()
~ "\n'number' must be an integer");
tmp.number = (*mem).get!int();
}
{
JSONValue* mem = "title" in it;
const(JSONValue)* mem = "title" in it;
enforce(mem !is null, it.toPrettyString()
~ "\nmust contain 'title'");
enforce((*mem).type == JSONType.string, (*mem).toPrettyString()
~ "\n'title' must be an string");
tmp.title = (*mem).get!string();
}
{
JSONValue* mem = "body" in it;
const(JSONValue)* mem = "body" in it;
enforce(mem !is null, it.toPrettyString()
~ "\nmust contain 'body'");
if ((*mem).type == JSONType.string)
Expand All @@ -419,7 +419,7 @@ GithubIssue[] getGithubIssuesRest(const string project, const string repo
}
}
{
JSONValue* mem = "closed_at" in it;
const(JSONValue)* mem = "closed_at" in it;
enforce(mem !is null, it.toPrettyString()
~ "\nmust contain 'closed_at'");
enforce((*mem).type == JSONType.string, (*mem).toPrettyString()
Expand All @@ -431,7 +431,7 @@ GithubIssue[] getGithubIssuesRest(const string project, const string repo
tmp.closedAt = DateTime.fromISOExtString(d);
}
{
JSONValue* mem = "labels" in it;
const(JSONValue)* mem = "labels" in it;
tmp.type = "bug fixes";
if (mem !is null)
{
Expand All @@ -443,7 +443,7 @@ GithubIssue[] getGithubIssuesRest(const string project, const string repo
{
enforce(l.type == JSONType.object, l.toPrettyString()
~ "\nmust be an object");
JSONValue* lbl = "name" in l;
const(JSONValue)* lbl = "name" in l;
enforce(lbl !is null, it.toPrettyString()
~ "\nmust contain 'name'");
enforce((*lbl).type == JSONType.string, (*lbl).toPrettyString()
Expand Down

0 comments on commit 513d070

Please sign in to comment.