Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow positive i32 number for dimension priority in dimension create #135

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

ayushjain17
Copy link
Collaborator

Problem

DB supports i32 values for priority but endpoints were restricted to u16

Solution

allow positive i32 number for dimension priority in dimension create

@ayushjain17 ayushjain17 requested a review from a team as a code owner June 27, 2024 08:44
@ayushjain17 ayushjain17 added the P0 label Jun 27, 2024
@ayushjain17 ayushjain17 force-pushed the temp/dimensionPriority branch from b7d6292 to 6fbe1f5 Compare June 27, 2024 09:45
@@ -195,8 +195,8 @@ where
class="input input-bordered w-full max-w-md"
value=priority.get()
on:change=move |ev| {
logging::log!("{:?}", event_target_value(& ev).parse::< u16 > ());
match event_target_value(&ev).parse::<u16>() {
logging::log!("{:?}", event_target_value(& ev).parse::< u32 > ());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
logging::log!("{:?}", event_target_value(& ev).parse::< u32 > ());
logging::log!("{:?}", event_target_value(& ev).parse::<u32>());

@ayushjain17 ayushjain17 force-pushed the temp/dimensionPriority branch from 6fbe1f5 to d05e6ee Compare June 27, 2024 10:13
Comment on lines 37 to 43
return Err(bad_argument!("Priority should be greater than 0"));
}

if req.priority < 0 {
return Err(bad_argument!("Expected positive value for priority",));
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we merge both of these checks?

@ayushjain17 ayushjain17 force-pushed the temp/dimensionPriority branch from d05e6ee to 038952e Compare June 27, 2024 11:16
@ayushjain17 ayushjain17 force-pushed the temp/dimensionPriority branch 2 times, most recently from ea23ed3 to b44a4fc Compare June 27, 2024 12:09
@ayushjain17 ayushjain17 force-pushed the temp/dimensionPriority branch from b44a4fc to 912bf10 Compare June 27, 2024 12:43
@ShubhranshuSanjeev ShubhranshuSanjeev merged commit 5e79ad8 into main Jun 27, 2024
4 checks passed
@ShubhranshuSanjeev ShubhranshuSanjeev deleted the temp/dimensionPriority branch June 27, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants