mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-25 21:00:01 +02:00
router/repo: code refactoring
This commit is contained in:
parent
2a13f682e0
commit
780cc2d110
13 changed files with 253 additions and 261 deletions
|
@ -72,8 +72,7 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
|||
}
|
||||
|
||||
// Only text file are editable online.
|
||||
_, isTextFile := base.IsTextFile(buf)
|
||||
if !isTextFile {
|
||||
if !base.IsTextFile(buf) {
|
||||
ctx.Handle(404, "", nil)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue