From f4832c7fa7c064ca197b8b6c29fa079e5005c0e7 Mon Sep 17 00:00:00 2001 From: Brian Butz Date: Tue, 26 Dec 2023 16:36:39 +0000 Subject: [PATCH] Support www.netrunnerdb.com decklist URLs when importing decks --- src/clj/web/nrdb.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clj/web/nrdb.clj b/src/clj/web/nrdb.clj index 39ad8ae18e..655e180a13 100644 --- a/src/clj/web/nrdb.clj +++ b/src/clj/web/nrdb.clj @@ -3,7 +3,6 @@ [monger.collection :as mc] [monger.operators :refer :all] [org.httpkit.client :as http] - [clj-uuid :as uuid] [clojure.string :as str])) (def nrdb-decklist-url "https://netrunnerdb.com/api/2.0/public/decklist/") @@ -12,7 +11,8 @@ (defn- parse-input "Want to handle an NRDB URL or just a deck id number" [input] - (let [input (if (str/starts-with? input nrdb-readable-url) + (let [input (str/replace input "www.netrunnerdb.com" "netrunnerdb.com") + input (if (str/starts-with? input nrdb-readable-url) (subs input (count nrdb-readable-url)) input) [id] (str/split input #"/")]