Delete now irrelevant authorize_api endpoint and logic

OFN API is now authenticating all users, if no session and no key is provided an anonymous user will be created so that user can access public endpoints, authorization is then done at each individual endpoint. This makes this spree api auth call irrelevant
This commit is contained in:
luisramos0
2019-07-31 22:25:40 +01:00
parent 66fdbe4379
commit 8aab9bacbe
7 changed files with 4 additions and 51 deletions

View File

@@ -272,13 +272,9 @@ describe "AdminProductEditCtrl", ->
describe "loading data upon initialisation", ->
it "gets a list of producers and then resets products with a list of data", ->
$httpBackend.expectGET("/api/users/authorise_api?token=API_KEY").respond success: "Use of API Authorised"
spyOn($scope, "fetchProducts").and.returnValue "nothing"
$scope.initialise()
$httpBackend.flush()
expect($scope.fetchProducts.calls.count()).toBe 1
expect($scope.spree_api_key_ok).toEqual true
describe "fetching products", ->
$q = null