This repository was archived by the owner on Mar 23, 2023. It is now read-only.
File tree 3 files changed +13
-10
lines changed
3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -136,15 +136,15 @@ func (s *Server) handleCat(c *fiber.Ctx) error {
136
136
return fiber .ErrBadRequest
137
137
}
138
138
139
- ok , err := s .idx .Exist (cid )
140
- if err != nil {
141
- zap .S ().Errorf ("idx get err: %s" , err )
142
- return err
143
- }
144
-
145
- if ! ok {
146
- return fiber .ErrBadRequest
147
- }
139
+ // ok, err := s.idx.Exist(cid)
140
+ // if err != nil {
141
+ // zap.S().Errorf("idx get err: %s", err)
142
+ // return err
143
+ // }
144
+
145
+ // if !ok {
146
+ // return fiber.ErrBadRequest
147
+ // }
148
148
149
149
path := filepath .Join (cid , c .Params ("file" ))
150
150
src , err := s .ipc .CatStream (path )
Original file line number Diff line number Diff line change @@ -99,4 +99,7 @@ func (s *Server) registerRoutes(app *fiber.App) {
99
99
app .Get ("/:cid/raw/:file" , s .handleCat )
100
100
101
101
app .Static ("/" , "./dist" )
102
+ app .Get ("/*" , func (c * fiber.Ctx ) error {
103
+ return c .SendFile ("./dist/index.html" )
104
+ })
102
105
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function App() {
25
25
< div tw = 'min-h-[80vh]' >
26
26
< Sections />
27
27
</ div >
28
- < aside tw = 'mt -5 text-center' >
28
+ < aside tw = 'my -5 text-center' >
29
29
< span tw = 'italic' > ©2021 Shoujo/IO, < a href = "https://github.com/mayocream/pastebin-ipfs/issues" > Feedback</ a > </ span >
30
30
</ aside >
31
31
</ >
You can’t perform that action at this time.
0 commit comments