remove the file extension of a paste internally so we only find by the real id
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m17s
Publish Docker Image / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m0s

This commit is contained in:
Lee 2024-06-07 22:23:51 +01:00
parent 79e0e5651a
commit da32c3bdfa

@ -84,6 +84,7 @@ public class PasteService {
* @return The content of the paste.
*/
public Paste getPaste(String id) {
id = id.contains(".") ? id.split("\\.")[0] : id; // Remove file extensions (if any)
log.info("Getting paste with the id '{}'", id);
long before = System.currentTimeMillis();
Optional<Paste> paste = pasteRepository.findById(id);