Skip to content

Commit 314aa24

Browse files
chore: autoformat with stylua
1 parent 91a9293 commit 314aa24

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lua/rest-nvim/client/curl/cli.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ function builder.build(req, ignore_stats)
300300
insert(args, builder.file(req.body.data.path))
301301
elseif req.body.__TYPE == "multipart_form_data" then
302302
log.error("multipart-form-data body is not supportted yet")
303-
elseif vim.list_contains({ "json", "xml", "raw", "graphql", }, req.body.__TYPE) then
303+
elseif vim.list_contains({ "json", "xml", "raw", "graphql" }, req.body.__TYPE) then
304304
insert(args, builder.raw_body(req.body.data))
305305
else
306306
log.error(("unkown body type: '%s'"):format(req.body.__TYPE))

lua/rest-nvim/parser/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function parser.parse_body(content_type, body_node, source, context)
146146
end
147147
body.data = vim.json.encode({
148148
query = query_text,
149-
variables = vim.json.decode(variables_text)
149+
variables = vim.json.decode(variables_text),
150150
})
151151
logger.debug(body.data)
152152
elseif node_type == "json_body" or content_type == "application/json" then

spec/parser/http_parser_spec.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ key5 = value5
202202
},
203203
}, parser.parse(req_node, source))
204204
end)
205-
it("parse graphql body", function ()
205+
it("parse graphql body", function()
206206
local source = open("spec/examples/graphql.http")
207207
local _, tree = utils.ts_parse_source(source)
208208
local req_node = assert(tree:root():child(1))
@@ -234,7 +234,7 @@ key5 = value5
234234
variables = {
235235
name = "NativeVim",
236236
owner = "boltlessengineer",
237-
}
237+
},
238238
}, vim.json.decode(req.body.data))
239239
end)
240240
end)

0 commit comments

Comments
 (0)