Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
szofttech-projekt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
team-ducktape
szofttech-projekt
Commits
483946a9
Commit
483946a9
authored
1 year ago
by
Laczkó Csongor Loránd
Browse files
Options
Downloads
Patches
Plain Diff
refactor(backend): Translate error messages to Hungarian
parent
fc577184
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/src/main/java/hu/pazmany/controller/Controller.java
+7
-7
7 additions, 7 deletions
backend/src/main/java/hu/pazmany/controller/Controller.java
with
7 additions
and
7 deletions
backend/src/main/java/hu/pazmany/controller/Controller.java
+
7
−
7
View file @
483946a9
...
@@ -59,9 +59,9 @@ public class Controller {
...
@@ -59,9 +59,9 @@ public class Controller {
try
{
try
{
dogService
.
addNewDog
(
dto
);
dogService
.
addNewDog
(
dto
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
NO_CONTENT
).
body
(
"
Wrong picture format, vagy nem tudom én ide csak feljárok
"
);
return
ResponseEntity
.
status
(
HttpStatus
.
NO_CONTENT
).
body
(
"
Hibás képformátum
"
);
}
}
return
ResponseEntity
.
status
(
HttpStatus
.
CREATED
).
body
(
"
Dog created successfully
"
);
return
ResponseEntity
.
status
(
HttpStatus
.
CREATED
).
body
(
"
Kutya sikeresen hozzáadva
"
);
}
}
@PostMapping
(
value
=
"/dogs/{id}/edit"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
@PostMapping
(
value
=
"/dogs/{id}/edit"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
...
@@ -76,16 +76,16 @@ public class Controller {
...
@@ -76,16 +76,16 @@ public class Controller {
try
{
try
{
dogDTO
=
objectMapper
.
readValue
(
stringDogDTO
,
DetailedDogDTO
.
class
);
dogDTO
=
objectMapper
.
readValue
(
stringDogDTO
,
DetailedDogDTO
.
class
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
).
body
(
"
Invalid DogDTO
JSON form
at
"
);
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
).
body
(
"
Hibás
JSON form
átum
"
);
}
}
// Save the updated dog entity
// Save the updated dog entity
try
{
try
{
dogService
.
editDog
(
id
,
dogDTO
,
mpf
);
dogService
.
editDog
(
id
,
dogDTO
,
mpf
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
NO_CONTENT
).
body
(
"
Wrong picture format, vagy nem tudom én ide csak feljárok
"
);
return
ResponseEntity
.
status
(
HttpStatus
.
NO_CONTENT
).
body
(
"
Hibás képformátum
"
);
}
}
return
ResponseEntity
.
ok
(
"
Dog attributes updated successfully
"
);
return
ResponseEntity
.
ok
(
"
Kutya sikeresen módosítva
"
);
}
else
{
}
else
{
return
ResponseEntity
.
notFound
().
build
();
return
ResponseEntity
.
notFound
().
build
();
}
}
...
@@ -109,13 +109,13 @@ public class Controller {
...
@@ -109,13 +109,13 @@ public class Controller {
// Check if the username is already taken
// Check if the username is already taken
if
(
userService
.
isUserExists
(
request
.
getUsername
()))
{
if
(
userService
.
isUserExists
(
request
.
getUsername
()))
{
return
ResponseEntity
.
badRequest
().
body
(
"
Username already exists
"
);
return
ResponseEntity
.
badRequest
().
body
(
"
Felhasználónév foglalt
"
);
}
}
// Save the user entity
// Save the user entity
userService
.
registerUser
(
request
);
userService
.
registerUser
(
request
);
return
ResponseEntity
.
status
(
HttpStatus
.
CREATED
).
body
(
"
User registered successfully
"
);
return
ResponseEntity
.
status
(
HttpStatus
.
CREATED
).
body
(
"
Felhasználó sikeresen létrehozva
"
);
}
}
@PostMapping
(
"/login"
)
@PostMapping
(
"/login"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment