add time taken to paste api and fixed text size on the creation page
This commit is contained in:
parent
0e585ed1cd
commit
f046d9cc68
@ -45,6 +45,7 @@ public class PasteService {
|
||||
*/
|
||||
public String createPaste(String content) {
|
||||
int length = content.length();
|
||||
long before = System.currentTimeMillis();
|
||||
log.info("Creating a new paste. (characters: {})", length);
|
||||
|
||||
// Check if the content is too large.
|
||||
@ -59,7 +60,7 @@ public class PasteService {
|
||||
System.currentTimeMillis(),
|
||||
content
|
||||
));
|
||||
log.info("Created a new paste with the id '{}'", paste.getId());
|
||||
log.info("Created a new paste with the id '{}' (took: {}ms)", paste.getId(), System.currentTimeMillis() - before);
|
||||
return paste.getId();
|
||||
}
|
||||
|
||||
@ -71,6 +72,7 @@ public class PasteService {
|
||||
*/
|
||||
public Paste getPaste(String id) {
|
||||
log.info("Getting paste with the id '{}'", id);
|
||||
long before = System.currentTimeMillis();
|
||||
Optional<Paste> paste = pasteRepository.findById(id);
|
||||
|
||||
// The paste does not exist.
|
||||
@ -78,7 +80,7 @@ public class PasteService {
|
||||
log.info("Paste with the id '{}' not found", id);
|
||||
throw new ResourceNotFoundException("Paste '%s' not found".formatted(id));
|
||||
}
|
||||
log.info("Got paste with the id '{}'", id);
|
||||
log.info("Got paste with the id '{}' (took: {}ms)", id, System.currentTimeMillis() - before);
|
||||
return paste.get();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
</head>
|
||||
<body class="bg-black text-white">
|
||||
<div class="p-3 h-screen w-screen relative">
|
||||
<div class="flex gap-2 h-full w-full text-xs">
|
||||
<div class="flex gap-2 h-full w-full text-sm">
|
||||
<p class="hidden md:block">></p>
|
||||
<textarea
|
||||
id="paste-input"
|
||||
|
Reference in New Issue
Block a user