From 0ef5aec6fe0db1ca0f6c8d58693e93dea0858e41 Mon Sep 17 00:00:00 2001 From: Saif Al Falah Date: Sun, 11 Oct 2020 05:27:59 +0530 Subject: [PATCH] supported versions have been updated --- src/http/post-index/helpers.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/http/post-index/helpers.js b/src/http/post-index/helpers.js index 111f68a..3412b0d 100644 --- a/src/http/post-index/helpers.js +++ b/src/http/post-index/helpers.js @@ -1,10 +1,20 @@ const parse = require("url-parse"); let isURL = require("is-url"); -// const latestVersion = 1303; +/* +Versions: +1303: v3 +1306: v3.1 +1307: v3.1 iOS 12 RC1 +1308: v3.1 iOS 12 +*/ + +let supportedVersions = [1303, 1306, 1307, 1308]; +let upForUpdate = []; exports.checkClientVersion = (body) => { if (!body.ver) throw new Error(606); - if (parseInt(body.ver) < parseInt(process.env.MIN_VER)) throw new Error(607); + if (!supportedVersions.includes(parseInt(body.ver))) throw new Error(607); + // if (parseInt(body.ver) < parseInt(process.env.MIN_VER)) throw new Error(607); }; // implement this in SSVD