[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taldir] branch master updated (1e125fc -> 605d6e1)
From: |
gnunet |
Subject: |
[taler-taldir] branch master updated (1e125fc -> 605d6e1) |
Date: |
Wed, 06 Jul 2022 18:07:53 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a change to branch master
in repository taldir.
from 1e125fc add gana submodule
new daf6531 update gana
new 2e31a23 -fix
new 4721d5a new taldir ecs
new 605d6e1 -fix
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Makefile | 8 ++++++++
cmd/taldir-server/main.go | 7 ++++---
contrib/gana | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 3708d34..c8c85d5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,12 @@ all: server cli
SCRIPT_TARGET:=$(shell dirname $(shell go list -f '{{.Target}}'
./cmd/taldir-server))
+gana:
+ git submodule update --init --recursive
+ git submodule sync --recursive
+ cd contrib/gana/gnu-taler-error-codes && make taler_error_codes.go
+ cp contrib/gana/gnu-taler-error-codes/taler_error_codes.go gana/
+
server:
go build ./cmd/taldir-server
@@ -12,3 +18,5 @@ install: server cli
go install ./cmd/taldir-server && go install ./cmd/taldir-cli
chmod +x scripts/*
cp scripts/* $(SCRIPT_TARGET)
+
+.PHONY: all gana
diff --git a/cmd/taldir-server/main.go b/cmd/taldir-server/main.go
index 6ce547a..61d5c82 100644
--- a/cmd/taldir-server/main.go
+++ b/cmd/taldir-server/main.go
@@ -42,6 +42,7 @@ import (
"gorm.io/gorm"
"encoding/base64"
"taler.net/taldir/util"
+ "taler.net/taldir/gana"
"crypto/sha512"
"gorm.io/driver/postgres"
"gopkg.in/ini.v1"
@@ -310,7 +311,7 @@ func registerRequest(w http.ResponseWriter, r
*http.Request){
}
err := json.NewDecoder(r.Body).Decode(&req)
if err != nil {
- errDetail.Code = 1006 //TALER_EC_JSON_INVALID
+ errDetail.Code = gana.GENERIC_JSON_INVALID
errDetail.Hint = "Unable to parse JSON"
resp, _ := json.Marshal(errDetail)
w.WriteHeader(400)
@@ -318,7 +319,7 @@ func registerRequest(w http.ResponseWriter, r
*http.Request){
return
}
if !validators[vars["method"]] {
- errDetail.Code = 3 //TALER_EC_NOT_IMPLEMENTED
+ errDetail.Code = gana.TALDIR_METHOD_NOT_SUPPORTED
errDetail.Hint = "Unsupported method"
errDetail.Detail = "Given method: " + vars["method"]
resp, _ := json.Marshal(errDetail)
@@ -342,7 +343,7 @@ func registerRequest(w http.ResponseWriter, r
*http.Request){
if time.Now().UnixMicro() < earliestReRegistration {
w.WriteHeader(429)
rlResponse := RateLimitedResponse{
- Code: 23, //FIXME TALER_EC_TALDIR_REGISTER_RATE_LIMITED
+ Code: gana.TALDIR_REGISTER_RATE_LIMITED,
RequestFrequency: reqFrequency,
Hint: "Registration rate limit reached",
}
diff --git a/contrib/gana b/contrib/gana
index cf9e9f7..bddac6f 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit cf9e9f70ae04da02be8d11fde5668e2ef72adc57
+Subproject commit bddac6f7879261d2ba6942bc95290906c40f589c
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taldir] branch master updated (1e125fc -> 605d6e1),
gnunet <=