mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 14:53:51 -06:00
fixes2
This commit is contained in:
parent
b4355321d1
commit
0a744b8c40
@ -7,6 +7,7 @@ import axios from "axios"
|
||||
import Layer from '../layers/layer.js';
|
||||
import fs from 'fs'
|
||||
import process from 'process'
|
||||
import Logger from "core/logger";
|
||||
|
||||
export default class MapVote extends DiscordBasePlugin {
|
||||
static get description() {
|
||||
@ -1110,6 +1111,11 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.verbose('Layers', 1, 'Pulling layers...');
|
||||
const response = await axios.post( // Change get to post for mod support
|
||||
'http://hub.afocommunity.com/api/layers.json', [0, 1959152751]
|
||||
);
|
||||
|
||||
for (const layer of response.data.Maps) {
|
||||
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
|
||||
const hellolayer = new Layer(layer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user