added accecc_control to contact in api and admin

pull/86/head
13621160019@163.com 2021-11-30 22:57:51 +08:00
parent 0d7a7de17f
commit 637f8ce481
2 changed files with 24 additions and 10 deletions

View File

@ -1,6 +1,13 @@
'use strict'; 'use strict';
app.controller('ContactController', function($scope, $window, $translate,$uibModal, ContactService,toaster,SweetAlert) { app.controller('ContactController', function(
$scope,
$window,
$translate,
$uibModal,
ContactService,
toaster,
SweetAlert) {
$scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user")); $scope.cur_user = JSON.parse($window.localStorage.getItem("myems_admin_ui_current_user"));
$scope.getAllContacts = function() { $scope.getAllContacts = function() {

View File

@ -1,6 +1,6 @@
{ {
"info": { "info": {
"_postman_id": "92712647-82fc-4cf2-acae-25fb13badd9e", "_postman_id": "98580f5c-106c-4b86-8262-ec3c918608e1",
"name": "MyEMS", "name": "MyEMS",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
}, },
@ -625,7 +625,14 @@
"method": "GET", "method": "GET",
"header": [], "header": [],
"url": { "url": {
"raw": "" "raw": "{{base_url}}/contacts/1",
"host": [
"{{base_url}}"
],
"path": [
"contacts",
"1"
]
} }
}, },
"response": [] "response": []
@ -643,7 +650,7 @@
}, },
{ {
"key": "Token", "key": "Token",
"value": "e3e753d078585ff791e8a899ad4bf3cc3673912061d5b6ab5119ed3ac713895ae1fc5f90f8d4a7942b1b139774b4db82e6702593b9a453a82982fdae47edac34", "value": "835aa13a4bc4af4ca2f47cac03d186bc49c13a30a025e9d983cc52238027f2eb7bd323784ee53a3833109ce1234acf9c8cb6754ba602b84049bb9244e3df6aeb",
"description": "Login to get a valid token", "description": "Login to get a valid token",
"type": "text" "type": "text"
} }
@ -677,7 +684,7 @@
}, },
{ {
"key": "Token", "key": "Token",
"value": "e3e753d078585ff791e8a899ad4bf3cc3673912061d5b6ab5119ed3ac713895ae1fc5f90f8d4a7942b1b139774b4db82e6702593b9a453a82982fdae47edac34", "value": "835aa13a4bc4af4ca2f47cac03d186bc49c13a30a025e9d983cc52238027f2eb7bd323784ee53a3833109ce1234acf9c8cb6754ba602b84049bb9244e3df6aeb",
"description": "Login to get a valid token", "description": "Login to get a valid token",
"type": "text" "type": "text"
} }
@ -687,13 +694,13 @@
"raw": "{\"data\":{\"name\":\"albert\", \"email\":\"albert@myems.io\", \"phone\":\"+8613888888899\", \"description\":\"contact description\"}}" "raw": "{\"data\":{\"name\":\"albert\", \"email\":\"albert@myems.io\", \"phone\":\"+8613888888899\", \"description\":\"contact description\"}}"
}, },
"url": { "url": {
"raw": "{{base_url}}/contacts/2", "raw": "{{base_url}}/contacts/3",
"host": [ "host": [
"{{base_url}}" "{{base_url}}"
], ],
"path": [ "path": [
"contacts", "contacts",
"2" "3"
] ]
} }
}, },
@ -712,19 +719,19 @@
}, },
{ {
"key": "Token", "key": "Token",
"value": "e3e753d078585ff791e8a899ad4bf3cc3673912061d5b6ab5119ed3ac713895ae1fc5f90f8d4a7942b1b139774b4db82e6702593b9a453a82982fdae47edac34", "value": "835aa13a4bc4af4ca2f47cac03d186bc49c13a30a025e9d983cc52238027f2eb7bd323784ee53a3833109ce1234acf9c8cb6754ba602b84049bb9244e3df6aeb",
"description": "Login to get a valid token", "description": "Login to get a valid token",
"type": "text" "type": "text"
} }
], ],
"url": { "url": {
"raw": "{{base_url}}/contacts/2", "raw": "{{base_url}}/contacts/3",
"host": [ "host": [
"{{base_url}}" "{{base_url}}"
], ],
"path": [ "path": [
"contacts", "contacts",
"2" "3"
] ]
} }
}, },