Skip to content

Commit 1df883d

Browse files
committed
EncodablePrivateUser: Add publish_notification field
This field can be used to check if the logged in user is currently subscribed to publish notifications.
1 parent 099737e commit 1df883d

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/tests/routes/me/snapshots/all__routes__me__get__me-2.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ expression: response.json()
1313
"is_admin": false,
1414
"login": "foo",
1515
"name": null,
16+
"publish_notifications": true,
1617
"url": "https://github.com/foo"
1718
}
1819
}

src/tests/routes/me/snapshots/all__routes__me__get__me-3.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ expression: response.json()
1919
"is_admin": false,
2020
"login": "foo",
2121
"name": null,
22+
"publish_notifications": true,
2223
"url": "https://github.com/foo"
2324
}
2425
}

src/views.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ pub struct EncodablePrivateUser {
468468
pub avatar: Option<String>,
469469
pub url: Option<String>,
470470
pub is_admin: bool,
471+
pub publish_notifications: bool,
471472
}
472473

473474
impl EncodablePrivateUser {
@@ -484,6 +485,7 @@ impl EncodablePrivateUser {
484485
gh_login,
485486
gh_avatar,
486487
is_admin,
488+
publish_notifications,
487489
..
488490
} = user;
489491
let url = format!("https://github.com/{gh_login}");
@@ -498,6 +500,7 @@ impl EncodablePrivateUser {
498500
name,
499501
url: Some(url),
500502
is_admin,
503+
publish_notifications,
501504
}
502505
}
503506
}

0 commit comments

Comments
 (0)