Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dan set user#697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chillenberger merged 2 commits intomasterfromdan-set-user
Jun 6, 2023
Merged

Dan set user#697

chillenberger merged 2 commits intomasterfromdan-set-user
Jun 6, 2023

Conversation

@chillenberger
Copy link
Contributor

In guards, get user from saved cookie rather than cluster owner. This ensures even if cluster is not chosen the user is known for rendering top nav.

};

let shared_state =match request.guard::<&State<Clusters>>().await{
let user_id:i64 =match cookies.get_private("user_id"){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
let user_id:i64 =match cookies.get_private("user_id"){
let user_id =match cookies.get_private("user_id"){

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also we are setting this object in our closed source code, you don't need to fetch the cookie here. The cookie won't provide enough user information once we start adding more, e.g. email.

let pool =shared_state.get(cluster_id);
let pool =clusters_shared_state.get(cluster_id);

let context =Context{
Copy link
Contributor

@levkklevkkJun 6, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Isn'tContext an exported public struct of this app? If not, it should be, so we instantiate it and set it in our code.

@chillenbergerchillenberger merged commit429e41f intomasterJun 6, 2023
@chillenbergerchillenberger deleted the dan-set-user branchJune 6, 2023 18:39
SilasMarvin pushed a commit that referenced this pull requestOct 5, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@levkklevkklevkk approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@chillenberger@levkk

[8]ページ先頭

©2009-2025 Movatter.jp