fix(config): better file org
This commit is contained in:
parent
a76d228e3f
commit
d2bde9bad8
12 changed files with 77 additions and 79 deletions
|
|
@ -1,7 +1,6 @@
|
|||
local M = {}
|
||||
|
||||
local cache = require('cp.cache')
|
||||
local config = require('cp.config').get_config()
|
||||
local constants = require('cp.constants')
|
||||
local logger = require('cp.log')
|
||||
local scraper = require('cp.scraper')
|
||||
|
|
@ -22,8 +21,8 @@ local scraper = require('cp.scraper')
|
|||
|
||||
---@return cp.PlatformItem[]
|
||||
function M.get_platforms()
|
||||
local config = require('cp.config').get_config()
|
||||
local result = {}
|
||||
|
||||
for _, platform in ipairs(constants.PLATFORMS) do
|
||||
if config.platforms[platform] then
|
||||
table.insert(result, {
|
||||
|
|
@ -32,7 +31,6 @@ function M.get_platforms()
|
|||
})
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue