Ignore:
Timestamp:
01/05/23 04:11:40 (18 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
1bd8d1e
Parents:
7d43957
Message:

Added admin view of pending roles and approve functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/service/impl/UserServiceImpl.java

    r7d43957 r676144b  
    11package com.example.autopartz.service.impl;
    22
     3import com.example.autopartz.model.Role;
    34import com.example.autopartz.model.User;
    45import com.example.autopartz.repository.UserRepository;
     
    67import org.springframework.stereotype.Service;
    78
     9import java.util.Collections;
    810import java.util.List;
    911
     
    2527        return userRepository.findAllByUsername(username).stream().findFirst().orElseThrow(RuntimeException::new);
    2628    }
     29
     30    @Override
     31    public User findById(Integer id) {
     32        return userRepository.findById(id).get();
     33    }
    2734}
Note: See TracChangeset for help on using the changeset viewer.