socialnetworknews-api

git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-api.git
Log | Files | Refs | LICENSE

commit 536bd8f3e45e03e9760331e7cae2b78cc824025b
parent dc5d1b2789e530cea353f7f305428063173c70ff
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun, 18 Feb 2018 22:01:59 +0100

Fix uuid generation

Diffstat:
Mapi/webserver.go | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/api/webserver.go b/api/webserver.go @@ -92,7 +92,10 @@ func addPapers(data []Paper) ([]byte, error) { var papers []Paper for _, p := range data { - puuid := uuid.NewV4() + puuid, UUIDerr := uuid.NewV4() + if UUIDerr != nil { + return nil, UUIDerr + } newUUID := puuid.String() newName := p.Name newDesc := p.Description