-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Super admin cors + Cookie issue fixed
- Loading branch information
1 parent
b9c3371
commit ec097ef
Showing
7 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export async function getAllStores(req, res) { | ||
|
||
try { | ||
const storeService = req.scope.resolve("storeService") | ||
|
||
let stores = await getStores(storeService); | ||
|
||
res.json({stores}); | ||
|
||
|
||
} catch (err) { | ||
throw err | ||
} | ||
} | ||
|
||
async function getStores(storeService) { | ||
const manager = storeService.manager_; | ||
const storeRepo = manager.getCustomRepository(storeService.storeRepository_); | ||
|
||
return await storeRepo.find({});; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
const URLConfigs = { | ||
BASE_URL: 'http://localhost:3000/api/', | ||
GET_Work_Package_URL: 'getWorkPackages' | ||
BASE_URL: 'http://localhost:3000/', | ||
GET_STORES: 'admin/stores', | ||
ADMIN_AUTH: 'admin/auth' | ||
}; | ||
|
||
export default URLConfigs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters