aboutsummaryrefslogtreecommitdiff
path: root/backend/models/responses.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-01-06 23:55:12 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-01-06 23:55:12 +0300
commit4820c7696db3c54959258b1a5b00c77e1246cbd7 (patch)
tree179edfca03618395939df1c3afccf2c90c64d424 /backend/models/responses.go
parent(#20) successful integration of demo upload to drive (diff)
downloadlphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.tar.gz
lphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.tar.bz2
lphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.zip
what the fuck is this mess (#21)
Diffstat (limited to 'backend/models/responses.go')
-rw-r--r--backend/models/responses.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/backend/models/responses.go b/backend/models/responses.go
new file mode 100644
index 0000000..70ee1b6
--- /dev/null
+++ b/backend/models/responses.go
@@ -0,0 +1,27 @@
1package models
2
3type Response struct {
4 Success bool `json:"success"`
5 Message string `json:"message"`
6 Data any `json:"data"`
7}
8
9type LoginResponse struct {
10 Token string `json:"token"`
11}
12
13type ProfileResponse struct {
14 Profile bool `json:"profile"`
15 SteamID string `json:"steam_id"`
16 Username string `json:"username"`
17 AvatarLink string `json:"avatar_link"`
18 CountryCode string `json:"country_code"`
19}
20
21func ErrorResponse(message string) Response {
22 return Response{
23 Success: false,
24 Message: message,
25 Data: nil,
26 }
27}