Skip to content

Commit 3e026bc

Browse files
committed
Updated Birthday API
1 parent 661b9da commit 3e026bc

File tree

3 files changed

+95
-252
lines changed

3 files changed

+95
-252
lines changed

api/v1/.gitignore

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# Environmente File
2-
.env
1+
# Node/NPM
2+
/node_modules/
3+
4+
# Latex Files
5+
*.aux
6+
*.fdb_latexmk
7+
*.fls
8+
*.synctex.gz
39

410
# Compiled class file
511
*.class
@@ -22,30 +28,106 @@
2228
*.tar.gz
2329
*.rar
2430

31+
# C Files
32+
*.o
33+
*.out
34+
35+
# Maven
36+
/target/
37+
2538
# Gradle
2639
/build/
2740
/.gradle/
2841
/out/
2942
gradle.properties
30-
/node_modules/
3143

32-
# IntelliJ IDEA
44+
# JetBrains IDEA
3345
/.idea/
46+
/.fleet/
3447
*.iml
3548
*.ipr
3649
*.iws
3750

51+
# VSCode
52+
.vscode/
53+
3854
# Eclipse
3955
.classpath
4056
.project
4157
.settings/
4258
/bin/
4359

60+
# Files containing safety info
61+
.env
62+
beta.json
63+
release.json
64+
4465
# Logging Stuff
4566
/logs/
4667

4768
# Mac Stuff
4869
.DS_Store
4970

5071
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
51-
hs_err_pid*
72+
hs_err_pid*
73+
74+
# GITIGNORE FOR C PROJECTS
75+
# Prerequisites
76+
*.d
77+
78+
# Object files
79+
*.o
80+
*.ko
81+
*.obj
82+
*.elf
83+
84+
# Linker output
85+
*.ilk
86+
*.map
87+
*.exp
88+
89+
# Precompiled Headers
90+
*.gch
91+
*.pch
92+
93+
# Libraries
94+
*.lib
95+
*.a
96+
*.la
97+
*.lo
98+
99+
# Shared objects (inc. Windows DLLs)
100+
*.dll
101+
*.so
102+
*.so.*
103+
*.dylib
104+
105+
# Executables
106+
*.exe
107+
*.out
108+
*.app
109+
*.i*86
110+
*.x86_64
111+
*.hex
112+
113+
# Debug files
114+
*.dSYM/
115+
*.su
116+
*.idb
117+
*.pdb
118+
/cmake-build-debug/
119+
120+
# Kernel Module Compile Results
121+
*.mod*
122+
*.cmd
123+
.tmp_versions/
124+
modules.order
125+
Module.symvers
126+
Mkfile.old
127+
dkms.conf
128+
129+
# Rust Stuff
130+
debug/
131+
target/
132+
**/*.rs.bk
133+
*.pdb

api/v1/routes/cafeBot/birthdays.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,16 @@ router.patch("/birthdays/:user_id/mention", check_authentication, check_admin, c
165165
// TODO: Test this.
166166
// Creates a birthday
167167
router.post("/birthdays/:user_id", check_authentication, check_admin, check_if_user_does_not_exist, (request, response, next) => {
168-
user_id = request.params.user_id;
169-
birthday = request.query.birthday;
170-
time_zone = request.query.time_zone;
168+
const user_id = request.params.user_id;
169+
const birthday = request.query.birthday;
170+
const time_zone = request.query.time_zone;
171171

172-
if (!birthday) {
172+
if (!birthday || !time_zone) {
173173
response.status(400).json({
174174
variables: {
175175
user_id: user_id,
176-
birthday: birthday || "undefined"
176+
birthday: birthday || "undefined",
177+
time_zone: time_zone || "undefined"
177178
},
178179
message: "A Variable is Undefined"
179180
});

0 commit comments

Comments
 (0)