lib/softcover/client.rb in softcover-0.9.6 vs lib/softcover/client.rb in softcover-0.9.7

- old
+ new

@@ -59,10 +59,14 @@ def destroy delete path_for(:books, book.id) end + def destroy_book_by_slug(slug) + delete path_for(:books, slug) + end + # ============ Screencasts =========== def get_screencast_upload_params(files) JSON post path_for(:books, book.id, :screencasts), files: files # TODO: handle errors end @@ -103,11 +107,9 @@ def path_for(action, *args) File.join ApiPrefix, Paths[action], *(args.map &:to_s) end def handle_422 - require "softcover/config" - Softcover::Config['api_key'] = nil return { "errors" => "You don't have access to that resource." } end end end \ No newline at end of file