|
|
@ -22,9 +22,7 @@ class ManageCategories extends React.Component {
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
axios.get(
|
|
|
|
axios.get(
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/applications/categories",
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/applications/categories",
|
|
|
|
{
|
|
|
|
).then(res => {
|
|
|
|
headers: { 'X-Platform': config.serverConfig.platform }
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
let categories = JSON.parse(res.data.data);
|
|
|
|
let categories = JSON.parse(res.data.data);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -59,9 +57,7 @@ class ManageCategories extends React.Component {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
axios.delete(
|
|
|
|
axios.delete(
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories/"+id,
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories/"+id,
|
|
|
|
{
|
|
|
|
|
|
|
|
headers: { 'X-Platform': config.serverConfig.platform }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
).then(res => {
|
|
|
|
).then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
notification["success"]({
|
|
|
|
notification["success"]({
|
|
|
@ -202,9 +198,7 @@ class ManageCategories extends React.Component {
|
|
|
|
axios.post(
|
|
|
|
axios.post(
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories",
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories",
|
|
|
|
data,
|
|
|
|
data,
|
|
|
|
{
|
|
|
|
|
|
|
|
headers: { 'X-Platform': config.serverConfig.platform }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
).then(res => {
|
|
|
|
).then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
notification["success"]({
|
|
|
|
notification["success"]({
|
|
|
@ -267,9 +261,7 @@ class ManageCategories extends React.Component {
|
|
|
|
axios.put(
|
|
|
|
axios.put(
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories/rename?from="+currentlyEditingId+"&to="+editingValue,
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invoker.uri +config.serverConfig.invoker.publisher+"/admin/applications/categories/rename?from="+currentlyEditingId+"&to="+editingValue,
|
|
|
|
{},
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
|
|
|
|
headers: { 'X-Platform': config.serverConfig.platform }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
).then(res => {
|
|
|
|
).then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
notification["success"]({
|
|
|
|
notification["success"]({
|
|
|
|