Compare commits
No commits in common. "d1741bcd32cd828599c73399c32dcf664e5d9790" and "03c273abb8f943773198a4577bd220a21426ea65" have entirely different histories.
d1741bcd32
...
03c273abb8
@ -4,7 +4,6 @@ import com.magamochi.mangamochi.client.NtfyClient;
|
||||
import com.magamochi.mangamochi.model.dto.DefaultResponseDTO;
|
||||
import com.magamochi.mangamochi.model.repository.UserRepository;
|
||||
import com.magamochi.mangamochi.task.ImageCleanupTask;
|
||||
import com.magamochi.mangamochi.task.MangaFollowUpdateTask;
|
||||
import com.magamochi.mangamochi.task.UpdateMangaListTask;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -16,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class ManagementController {
|
||||
private final UpdateMangaListTask updateMangaListTask;
|
||||
private final ImageCleanupTask imageCleanupTask;
|
||||
private final MangaFollowUpdateTask mangaFollowUpdateTask;
|
||||
private final UserRepository userRepository;
|
||||
|
||||
private final NtfyClient ntfyClient;
|
||||
@ -45,18 +43,6 @@ public class ManagementController {
|
||||
return DefaultResponseDTO.ok().build();
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "Trigger user follow update",
|
||||
description = "Trigger user follow update",
|
||||
tags = {"Management"},
|
||||
operationId = "userFollowUpdate")
|
||||
@PostMapping("user-follow")
|
||||
public DefaultResponseDTO<Void> triggerUserFollowUpdate() {
|
||||
mangaFollowUpdateTask.updateMangaList();
|
||||
|
||||
return DefaultResponseDTO.ok().build();
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "Test notification",
|
||||
description = "Sends a test notification to all users",
|
||||
@ -70,7 +56,7 @@ public class ManagementController {
|
||||
user ->
|
||||
ntfyClient.notify(
|
||||
new NtfyClient.Request(
|
||||
"mangamochi-" + user.getId().toString(),
|
||||
"mangamochi/" + user.getId().toString(),
|
||||
"Mangamochi",
|
||||
"This is a test notification :)")));
|
||||
|
||||
|
||||
@ -144,7 +144,7 @@ public class MangaService {
|
||||
umf ->
|
||||
ntfyClient.notify(
|
||||
new NtfyClient.Request(
|
||||
"mangamochi-" + umf.getUser().getId().toString(),
|
||||
"mangamochi/" + umf.getUser().getId().toString(),
|
||||
umf.getManga().getTitle(),
|
||||
"New chapter available on " + mangaProvider.getProvider().getName())));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user