Skip to content

Instantly share code, notes, and snippets.

@webus
Created March 22, 2014 05:47
Show Gist options
  • Save webus/9701876 to your computer and use it in GitHub Desktop.
Save webus/9701876 to your computer and use it in GitHub Desktop.
(ns willwear.models.thing-model
(:require [willwear.storage.db.ww-storage :as storage]))
(defn register-new-thing [session-token thing-tags thing-name thing-summary & {:keys [db] :or {db storage/willwear-db}}]
(let [user-uid (:user_uid (storage/check-user-session session-token :db db))]
(let [user-data (storage/get-user-by-uid user-uid :db db)]
(storage/add-new-thing user-uid thing-name thing-summary nil))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment