Skip to content

Commit

Permalink
preperation for ft-sdk: 0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
amitu committed Jun 3, 2024
1 parent 837aaf0 commit d48f6b1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## 3rd June 2024

### ft-sdk: `0.1.6`

- added `#[serde(default)]` to `ft_sdk::auth::ProviderData`
- added `#[derive(Default)` to `ft_sdk::auth::ProviderData`
- added `#[derive(Debug)` to `ft_sdk::auth::{UserId, SessionID, Counter}`

## 31st May 2024

### ft-sdk: `0.1.5`
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ft-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ft-sdk"
version = "0.1.5"
version = "0.1.6"
description = "ft-sdk: SDK for building FifthTry Applications"
authors.workspace = true
edition.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions ft-sdk/src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ pub use schema::{fastn_session, fastn_user};
pub use session::SessionID;
pub use utils::Counter;

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct UserId(pub i64);

#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Default)]
#[serde(default)]
pub struct ProviderData {
pub identity: String,
pub username: Option<String>,
Expand Down
2 changes: 1 addition & 1 deletion ft-sdk/src/auth/session.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct SessionID(pub String);

#[cfg(feature = "auth-provider")]
Expand Down
2 changes: 1 addition & 1 deletion ft-sdk/src/auth/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) fn user_data_by_query(
Ok((ft_sdk::auth::UserId(ud.id), serde_json::from_str(&ud.data)?))
}

#[derive(diesel::QueryableByName)]
#[derive(diesel::QueryableByName, Debug)]
pub struct Counter {
#[diesel(sql_type = diesel::sql_types::BigInt)]
pub count: i64,
Expand Down

0 comments on commit d48f6b1

Please sign in to comment.