mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-02 01:15:00 -04:00
codex: use std.json.fmt for poll body
This commit is contained in:
1 parent
6c28c3d6c9
commit
0035d31fc9
1 file changed
+4
-1
@@ -148,7 +148,10 @@ fn deviceLogin(allocator: std.mem.Allocator, interrupt: ?*zenai.http.Interrupt)
|
||||
.{ verify_url, dc.user_code },
|
||||
);
|
||||
|
||||
const poll_body = try std.fmt.allocPrint(a, "{{\"device_auth_id\":\"{s}\",\"user_code\":\"{s}\"}}", .{ dc.device_auth_id, dc.user_code });
|
||||
const poll_body = try std.fmt.allocPrint(a, "{f}", .{std.json.fmt(
|
||||
.{ .device_auth_id = dc.device_auth_id, .user_code = dc.user_code },
|
||||
.{},
|
||||
)});
|
||||
const dt: DeviceToken = while (true) {
|
||||
// The REPL's Ctrl-C only fires the interrupt (it never kills the
|
||||
// process), so the wait must poll it.
|
||||
|
||||
Reference in new issue
Block a user