remove the file extension of a paste internally so we only find by the real id
This commit is contained in:
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);
|
||||
|
Reference in New Issue
Block a user