Added port to job function

This commit is contained in:
Harrison Cramer
2023-05-19 17:36:37 -07:00
parent 63fc025070
commit ca7c702fd0
2 changed files with 5 additions and 4 deletions

View File

@@ -1,9 +1,10 @@
local notify = require("notify")
local Job = require("plenary.job")
local state = require("gitlab.state")
local M = {}
M.run_job = function(endpoint, method, body, callback)
local args = { "-s", "-X", (method or "POST"), "localhost:8081/" .. endpoint }
local args = { "-s", "-X", (method or "POST"), string.format("localhost:%s/", state.PORT) .. endpoint }
if body ~= nil then
table.insert(args, 1, "-d")