Skip to content

Commit

Permalink
Refactorings
Browse files Browse the repository at this point in the history
Added extra stats - tags
  • Loading branch information
michmzr committed Feb 14, 2023
1 parent 2fe01b7 commit 5a15500
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ public void cleanDb() {

shellHelper.printInfo("Collection of pocket items got cleaned.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void authorize() throws IOException, InterruptedException {
while (authorizationService.isAuthSessionActive()) {
Thread.sleep(80);
}
;

shellHelper.printInfo("App authorized to your API.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void statsToday(@ShellOption(value = {"--update", "-u"},
TimeUtils.instantTodayEnd()
);

shellHelper.print("Today's stats ->");
shellHelper.print("added:" + stats.added());
shellHelper.print("read:" + stats.read());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import eu.cybershu.pocketstats.pocket.PocketAuthorizationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -11,12 +10,15 @@
@RestController
@RequestMapping("/pocket/auth/")
public class PocketApiController {
@Autowired
private PocketAuthorizationService authorizationService;
private final PocketAuthorizationService authorizationService;

public PocketApiController(PocketAuthorizationService authorizationService) {
this.authorizationService = authorizationService;
}

@GetMapping("token")
public String onRedirect() {
log.info("Redirection successfull");
log.info("Redirection successful.");

authorizationService.deregisterAuthSession();

Expand Down
76 changes: 56 additions & 20 deletions src/main/raporting/raport.ipynb

Large diffs are not rendered by default.

0 comments on commit 5a15500

Please sign in to comment.