mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	chore(share): fix @typescript-eslint/no-unused-vars for "next"
alternative solution, since they are unused and it is the last argument → remove it. We can still go that route later on though, if we agree upon it.
This commit is contained in:
		
							parent
							
								
									bdc829198c
								
							
						
					
					
						commit
						c2b75a6421
					
				@ -195,7 +195,7 @@ function register(router: Router) {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    router.get("/share/", (req, res, next) => {
 | 
			
		||||
    router.get("/share/", (req, res, _next) => {
 | 
			
		||||
        if (req.path.substr(-1) !== "/") {
 | 
			
		||||
            res.redirect("../share/");
 | 
			
		||||
            return;
 | 
			
		||||
@ -211,7 +211,7 @@ function register(router: Router) {
 | 
			
		||||
        renderNote(shaca.shareRootNote, req, res);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    router.get("/share/:shareId", (req, res, next) => {
 | 
			
		||||
    router.get("/share/:shareId", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        const { shareId } = req.params;
 | 
			
		||||
@ -221,7 +221,7 @@ function register(router: Router) {
 | 
			
		||||
        renderNote(note, req, res);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    router.get("/share/api/notes/:noteId", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/notes/:noteId", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
        let note: SNote | boolean;
 | 
			
		||||
 | 
			
		||||
@ -234,7 +234,7 @@ function register(router: Router) {
 | 
			
		||||
        res.json(note.getPojo());
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    router.get("/share/api/notes/:noteId/download", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/notes/:noteId/download", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        let note: SNote | boolean;
 | 
			
		||||
@ -256,7 +256,7 @@ function register(router: Router) {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // :filename is not used by trilium, but instead used for "save as" to assign a human-readable filename
 | 
			
		||||
    router.get("/share/api/images/:noteId/:filename", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/images/:noteId/:filename", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        let image: SNote | boolean;
 | 
			
		||||
@ -282,7 +282,7 @@ function register(router: Router) {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // :filename is not used by trilium, but instead used for "save as" to assign a human-readable filename
 | 
			
		||||
    router.get("/share/api/attachments/:attachmentId/image/:filename", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/attachments/:attachmentId/image/:filename", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        let attachment: SAttachment | boolean;
 | 
			
		||||
@ -300,7 +300,7 @@ function register(router: Router) {
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    router.get("/share/api/attachments/:attachmentId/download", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/attachments/:attachmentId/download", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        let attachment: SAttachment | boolean;
 | 
			
		||||
@ -322,7 +322,7 @@ function register(router: Router) {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // used for PDF viewing
 | 
			
		||||
    router.get("/share/api/notes/:noteId/view", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/notes/:noteId/view", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        let note: SNote | boolean;
 | 
			
		||||
@ -340,7 +340,7 @@ function register(router: Router) {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // Used for searching, require noteId so we know the subTreeRoot
 | 
			
		||||
    router.get("/share/api/notes", (req, res, next) => {
 | 
			
		||||
    router.get("/share/api/notes", (req, res, _next) => {
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        const ancestorNoteId = req.query.ancestorNoteId ?? "_share";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user