Skip to content

Commit

Permalink
check profileget response code
Browse files Browse the repository at this point in the history
  • Loading branch information
donpdonp committed Aug 21, 2019
1 parent 5c1a870 commit 0e959ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,12 @@ fn photoback(command: *thread.Command) void {

fn profileback(command: *thread.Command) void {
const reqres = command.verb.http;
reqres.column.account = command.verb.http.tree.root.Object;
gui.schedule(gui.update_column_ui_schedule, @ptrCast(*c_void, reqres.column));
if (reqres.response_code >= 200 and reqres.response_code < 300) {
reqres.column.account = reqres.tree.root.Object;
gui.schedule(gui.update_column_ui_schedule, @ptrCast(*c_void, reqres.column));
} else {
warn("profile fail http status {}\n", reqres.response_code);
}
}

fn cache_update(toot: *toot_lib.Type) void {
Expand Down

0 comments on commit 0e959ce

Please sign in to comment.