Skip to content

Commit

Permalink
Server refinements (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
vocksel authored Jan 21, 2024
1 parent 9ef93d3 commit b38ca6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions server/src/routes/getExtensions.luau
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ local function getExtensions(request)
if extensions then
return {
status = 200,
headers = {
["Content-Type"] = "application/json",
},
body = net.jsonEncode(extensions),
}
end
Expand Down
5 changes: 4 additions & 1 deletion server/src/routes/getThemes.luau
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local function getThemes(request)
local extensionName = request.query.extensionName
local extensionVersion = request.query.extensionVersion

if not (publisherName or extensionName or extensionVersion) then
if not (publisherName and extensionName and extensionVersion) then
return {
status = 500,
}
Expand Down Expand Up @@ -60,6 +60,9 @@ local function getThemes(request)

return {
status = 200,
headers = {
["Content-Type"] = "application/json",
},
body = net.jsonEncode(themes),
}
end
Expand Down

0 comments on commit b38ca6c

Please sign in to comment.