Skip to content

Commit

Permalink
Update 1.0.11 - Changed WebHook configuration location for more secur…
Browse files Browse the repository at this point in the history
…ity.
  • Loading branch information
Muhaddil committed Jan 1, 2025
1 parent e6d857c commit aafe44c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 1 addition & 3 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Config = {}

Config.webHook = ''
Config.webHookName = 'Logs Muhaddil Insurance' -- Name of the WebHook
Config.webHookLogo = 'https://github.com/Muhaddil/RSSWikiPageCreator/blob/main/public/assets/other/MuhaddilOG.png?raw=true' -- Logo of the WebHook bot
-- Configure the WebHook on server.lua file, lines 4, 5 and 6

Config.Locations = {
["insurances"] = {
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lua54 'yes'

author 'Muhaddil'
description 'Simple Medical Insurance Script'
version 'v1.0.10'
version 'v1.0.11'

shared_script 'config.lua'
client_script 'client.lua'
Expand Down
7 changes: 5 additions & 2 deletions server.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
local currentVersion = GetResourceMetadata(GetCurrentResourceName(), 'version')
local resourceRepo = 'Muhaddil/muhaddil_insurance'
local githubApiUrl = 'https://api.github.com/repos/' .. resourceRepo .. '/releases/latest'
local webHookLink = '' -- Discord WebHook Link
local webHookName = 'Logs Muhaddil Insurance' -- Name of the WebHook
local webHookLogo = 'https://github.com/Muhaddil/RSSWikiPageCreator/blob/main/public/assets/other/MuhaddilOG.png?raw=true' -- Logo of the WebHook bot

if Config.FrameWork == "esx" then
ESX = exports['es_extended']:getSharedObject()
Expand All @@ -19,8 +22,8 @@ local function discordWebHookSender(name, message, color)
},
}
}
PerformHttpRequest(Config.webHook, function(err, text, headers) end, 'POST',
json.encode({ username = Config.webHookName, avatar_url = Config.webHookLogo, embeds = connect }),
PerformHttpRequest(webHookLink, function(err, text, headers) end, 'POST',
json.encode({ username = webHookName, avatar_url = webHookLogo, embeds = connect }),
{ ['Content-Type'] = 'application/json' })
end

Expand Down

0 comments on commit aafe44c

Please sign in to comment.