👔 Removed extentions filters in static use case
This commit is contained in:
parent
5ad5537b3e
commit
05cc536b5a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue