Browse Source

Require users to agree to license before starting the API

master
Morgan Bazalgette 1 year ago
parent
commit
741b1e0b9f
Signed by: Morgan Bazalgette <the@howl.moe> GPG Key ID: 40D328300D245DA5
2 changed files with 12 additions and 1 deletions
  1. 6
    1
      main.go
  2. 6
    0
      vendor/vendor.json

+ 6
- 1
main.go View File

@@ -6,6 +6,7 @@ import (
6 6
 	"strings"
7 7
 	"syscall"
8 8
 
9
+	"zxq.co/ripple/agplwarning"
9 10
 	"zxq.co/ripple/rippleapi/app"
10 11
 	"zxq.co/ripple/rippleapi/beatmapget"
11 12
 	"zxq.co/ripple/rippleapi/common"
@@ -30,6 +31,11 @@ func init() {
30 31
 var db *sqlx.DB
31 32
 
32 33
 func main() {
34
+	err := agplwarning.Warn("ripple", "Ripple API")
35
+	if err != nil {
36
+		fmt.Println(err)
37
+	}
38
+
33 39
 	fmt.Print("Ripple API")
34 40
 	if Version != "" {
35 41
 		fmt.Print("; git commit hash: ", Version)
@@ -51,7 +57,6 @@ func main() {
51 57
 		conf.DSN += c + "parseTime=true&charset=utf8mb4,utf8&collation=utf8mb4_general_ci"
52 58
 	}
53 59
 
54
-	var err error
55 60
 	db, err = sqlx.Open(conf.DatabaseType, conf.DSN)
56 61
 	if err != nil {
57 62
 		schiavo.Bunker.Send(err.Error())

+ 6
- 0
vendor/vendor.json View File

@@ -183,6 +183,12 @@
183 183
 			"revisionTime": "2016-10-17T20:25:41Z"
184 184
 		},
185 185
 		{
186
+			"checksumSHA1": "vTjp3tQOr8z8CNjZWwPzgR+t2qQ=",
187
+			"path": "zxq.co/ripple/agplwarning",
188
+			"revision": "d3a3d0ee424fcb0bd09a651354c1735285f59f8c",
189
+			"revisionTime": "2018-02-04T10:46:38Z"
190
+		},
191
+		{
186 192
 			"checksumSHA1": "SI9tgNMlnMhxP7t6cAGuDjvoAHg=",
187 193
 			"path": "zxq.co/ripple/ocl",
188 194
 			"revision": "b499c4fc6bcd791b59dc994059e6f53cd939cf24",

Loading…
Cancel
Save