Skip to content

Commit

Permalink
Merge pull request #47 from Stremio/chore/update-core-2
Browse files Browse the repository at this point in the history
chore: update core
  • Loading branch information
tymmesyde committed Jun 13, 2024
2 parents ab34dfe + d368f00 commit 4966141
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions src/commonMain/rust/bridge/auth_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ impl FromProtobuf<AuthRequest> for types::AuthRequest {
token: login_with_token.token.to_owned(),
}
}
Some(types::auth_request::Type::Facebook(facebook)) => AuthRequest::Facebook {
token: facebook.token.to_owned(),
},
Some(types::auth_request::Type::Register(register)) => AuthRequest::Register {
email: register.email.to_owned(),
password: register.password.to_owned(),
Expand Down Expand Up @@ -43,6 +46,11 @@ impl ToProtobuf<types::AuthRequest, ()> for AuthRequest {
token: token.to_owned(),
})
}
AuthRequest::Facebook { token } => {
types::auth_request::Type::Facebook(types::auth_request::Facebook {
token: token.to_owned(),
})
}
AuthRequest::Register {
email,
password,
Expand Down
7 changes: 6 additions & 1 deletion src/main/proto/stremio/core/types/auth_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ message AuthRequest {
oneof type {
Login login = 1;
LoginWithToken login_with_token = 2;
Register register = 3;
Facebook facebook = 3;
Register register = 4;
}

message Login {
Expand All @@ -24,6 +25,10 @@ message AuthRequest {
required string token = 1;
}

message Facebook {
required string token = 1;
}

message Register {
required string email = 1;
required string password = 2;
Expand Down

0 comments on commit 4966141

Please sign in to comment.