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

feat: Adds input validation to network slices and device groups #241

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

gruyaume
Copy link
Contributor

@gruyaume gruyaume commented Dec 7, 2023

Description

We now validate whether a network slice (and device group) with the same name already exists before creating it. If it already exists, it is displayed to the user in the creation modal.

Fixes #231

image
image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that validate the behaviour of the software.
  • I validated that new and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@gruyaume gruyaume marked this pull request as ready for review December 7, 2023 18:00
@gruyaume gruyaume requested a review from a team as a code owner December 7, 2023 18:00
@gruyaume gruyaume merged commit 17d377f into main Dec 7, 2023
9 checks passed
@gruyaume gruyaume deleted the dev-nsinput branch December 7, 2023 19:57
@@ -87,7 +87,8 @@ async function handleGET(req: NextApiRequest, res: NextApiResponse) {
});

if (!response.ok) {
throw new Error(`Error getting device group. Error code: ${response.status}`);
res.status(response.status).json({ error: "Error retrieving network slice." });
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be device group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can create duplicate device groups
3 participants