Skip to content

Commit

Permalink
add :: UserInfoServiceImpl 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed Apr 4, 2024
1 parent 4023780 commit 5a9e00b
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.mindway.server.v2.domain.user.service.impl;

import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.presentation.dto.response.UserInfoResponse;
import com.mindway.server.v2.domain.user.service.UserInfoService;
import com.mindway.server.v2.domain.user.util.UserUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true, rollbackFor = {Exception.class})
public class UserInfoServiceImpl implements UserInfoService {

private final UserUtil userUtil;

public UserInfoResponse execute() {
User user = userUtil.getCurrentUser();
return new UserInfoResponse(user.getName(), user.getAuthority());
}
}

0 comments on commit 5a9e00b

Please sign in to comment.