aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction_handlers.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-17 19:51:37 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-17 19:51:37 -0700
commitf8e4cd540b87de3e308ec18a2b040b284a741522 (patch)
tree6d8b1ad0bd04cc19ecaf276e271caaef4d0866f4 /hotline/transaction_handlers.go
parent45ca5d60383cbe270624c713b916da29af7ba88f (diff)
Clean up various linter warnings
Diffstat (limited to 'hotline/transaction_handlers.go')
-rw-r--r--hotline/transaction_handlers.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go
index 20b87e2..0fb250f 100644
--- a/hotline/transaction_handlers.go
+++ b/hotline/transaction_handlers.go
@@ -1256,8 +1256,9 @@ func HandleNewNewsFldr(cc *ClientConn, t *Transaction) (res []Transaction, err e
func HandleGetNewsArtNameList(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
if !cc.Authorize(accessNewsReadArt) {
res = append(res, cc.NewErrReply(t, "You are not allowed to read news."))
- return res, err
+ return res, nil
}
+
pathStrs := ReadNewsPath(t.GetField(FieldNewsPath).Data)
var cat NewsCategoryListData15
@@ -1272,11 +1273,11 @@ func HandleGetNewsArtNameList(cc *ClientConn, t *Transaction) (res []Transaction
b, err := io.ReadAll(&nald)
if err != nil {
-
+ return res, fmt.Errorf("error loading news articles: %w", err)
}
res = append(res, cc.NewReply(t, NewField(FieldNewsArtListData, b)))
- return res, err
+ return res, nil
}
// HandleGetNewsArtData requests information about the specific news article.