mirror of https://github.com/halo-dev/halo
Add two TODOs of migration
parent
08d824b414
commit
2233dc8d12
|
@ -40,7 +40,7 @@ public class RecoveryController {
|
|||
@ApiParam("This file content type should be json")
|
||||
@RequestPart("file") MultipartFile file) {
|
||||
if (optionService.getByPropertyOrDefault(PrimaryProperties.IS_INSTALLED, Boolean.class, false)) {
|
||||
throw new BadRequestException("不能在博客初始化完成之后迁移数据");
|
||||
throw new BadRequestException("无法在博客初始化完成之后迁移数据");
|
||||
}
|
||||
|
||||
recoveryService.migrateFromV0_4_3(file);
|
||||
|
|
|
@ -10,7 +10,7 @@ import static run.halo.app.utils.BeanUtils.updateProperties;
|
|||
* <b>The implementation type must be equal to DTO type</b>
|
||||
*
|
||||
* @param <DTO> the implementation class type
|
||||
* @param <DOMAIN> doamin type
|
||||
* @param <DOMAIN> domain type
|
||||
* @author johnniang
|
||||
*/
|
||||
public interface OutputConverter<DTO extends OutputConverter<DTO, DOMAIN>, DOMAIN> {
|
||||
|
|
|
@ -135,7 +135,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
userService.getByEmailOfNonNull(username) : userService.getByUsernameOfNonNull(username);
|
||||
} catch (NotFoundException e) {
|
||||
log.error("Failed to find user by name: " + username, e);
|
||||
eventPublisher.publishEvent(new LogEvent(this, "", LogType.LOGIN_FAILED, loginParam.getUsername()));
|
||||
eventPublisher.publishEvent(new LogEvent(this, loginParam.getUsername(), LogType.LOGIN_FAILED, loginParam.getUsername()));
|
||||
|
||||
throw new BadRequestException(mismatchTip);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class AdminServiceImpl implements AdminService {
|
|||
|
||||
if (!userService.passwordMatch(user, loginParam.getPassword())) {
|
||||
// If the password is mismatch
|
||||
eventPublisher.publishEvent(new LogEvent(this, "", LogType.LOGIN_FAILED, loginParam.getUsername()));
|
||||
eventPublisher.publishEvent(new LogEvent(this, loginParam.getUsername(), LogType.LOGIN_FAILED, loginParam.getUsername()));
|
||||
|
||||
throw new BadRequestException(mismatchTip);
|
||||
}
|
||||
|
|
|
@ -218,6 +218,10 @@ public class RecoveryServiceImpl implements RecoveryService {
|
|||
// Handle comments
|
||||
List<BaseComment> baseComments = handleComment(commentsObject, createdPost.getId());
|
||||
|
||||
// TODO Handle categories
|
||||
|
||||
// TODO Handle tags
|
||||
|
||||
List<PostComment> postComments = baseComments.stream()
|
||||
.map(baseComment -> BeanUtils.transformFrom(baseComment, PostComment.class))
|
||||
.collect(Collectors.toList());
|
||||
|
|
Loading…
Reference in New Issue