-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.greenfoxacademy.backend.services; | ||
|
||
import com.greenfoxacademy.backend.models.User; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
Check warning on line 6 in backend/src/main/java/com/greenfoxacademy/backend/services/UserService.java GitHub Actions / build
|
||
public interface UserService { | ||
public void register(User newUser); | ||
Check warning on line 8 in backend/src/main/java/com/greenfoxacademy/backend/services/UserService.java GitHub Actions / build
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.greenfoxacademy.backend.services; | ||
|
||
import com.greenfoxacademy.backend.models.User; | ||
import com.greenfoxacademy.backend.repositories.UserRepository; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
Check warning on line 7 in backend/src/main/java/com/greenfoxacademy/backend/services/UserServiceImpl.java GitHub Actions / build
|
||
public class UserServiceImpl implements UserService { | ||
UserRepository userRepository; | ||
Check warning on line 9 in backend/src/main/java/com/greenfoxacademy/backend/services/UserServiceImpl.java GitHub Actions / build
|
||
|
||
|
||
@Override | ||
Check warning on line 12 in backend/src/main/java/com/greenfoxacademy/backend/services/UserServiceImpl.java GitHub Actions / build
|
||
public void register(User newUser) { | ||
userRepository.save(newUser); | ||
Check warning on line 14 in backend/src/main/java/com/greenfoxacademy/backend/services/UserServiceImpl.java GitHub Actions / build
|
||
} | ||
Check warning on line 15 in backend/src/main/java/com/greenfoxacademy/backend/services/UserServiceImpl.java GitHub Actions / build
|
||
} |