👔 Removed extentions filters in static use case

This commit is contained in:
Maxim Lebedev 2023-11-18 19:02:28 +06:00
parent 5ad5537b3e
commit 05cc536b5a
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 0 additions and 5 deletions

View File

@ -3,7 +3,6 @@ package usecase
import (
"context"
"fmt"
"io/fs"
"path"
"strings"
@ -24,10 +23,6 @@ func NewStaticUseCase(statics static.Repository) static.UseCase {
func (ucase *staticUseCase) Do(ctx context.Context, p string) (*domain.Resource, error) {
p = strings.TrimPrefix(path.Clean(p), "/")
if ext := path.Ext(p); ext == ".html" || ext == ".md" {
return nil, fs.ErrNotExist
}
f, err := ucase.statics.Get(ctx, p)
if err != nil {
return nil, fmt.Errorf("cannot get static file: %w", err)