update routes
This commit is contained in:
@@ -17,7 +17,7 @@ import { PermissionsDec } from "../../common/decorators/permission.decorator";
|
|||||||
import { PermissionEnum } from "../users/enums/permission.enum";
|
import { PermissionEnum } from "../users/enums/permission.enum";
|
||||||
import { UserDec } from "../../common/decorators/user.decorator";
|
import { UserDec } from "../../common/decorators/user.decorator";
|
||||||
|
|
||||||
@ApiTags("d-menu")
|
@ApiTags("d-kala")
|
||||||
@Controller()
|
@Controller()
|
||||||
@AuthGuards()
|
@AuthGuards()
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export class ShopService {
|
|||||||
|
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.get<IExternalApiResponse<any[]>>(`${this.config.baseUrl}/super-admin/restaurants`, {
|
.get<IExternalApiResponse<any[]>>(`${this.config.baseUrl}/super-admin/shops`, {
|
||||||
params,
|
params,
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
@@ -89,7 +89,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.get(`${this.config.baseUrl}/super-admin/restaurants/${id}`, {
|
.get(`${this.config.baseUrl}/super-admin/shops/${id}`, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -140,7 +140,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.post(`${this.config.baseUrl}/super-admin/restaurants`, setupRestaurantDto, {
|
.post(`${this.config.baseUrl}/super-admin/shops`, setupRestaurantDto, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -169,7 +169,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.patch(`${this.config.baseUrl}/super-admin/restaurants/${id}`, dto, {
|
.patch(`${this.config.baseUrl}/super-admin/shops/${id}`, dto, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -199,7 +199,7 @@ export class ShopService {
|
|||||||
console.log('subscriptionId', subscriptionId)
|
console.log('subscriptionId', subscriptionId)
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.get(`${this.config.baseUrl}/super-admin/restaurants/subscription/${subscriptionId}`, {
|
.get(`${this.config.baseUrl}/super-admin/shops/subscription/${subscriptionId}`, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -288,7 +288,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.get(`${this.config.baseUrl}/super-admin/restaurants/${restaurantId}/admins`, {
|
.get(`${this.config.baseUrl}/super-admin/shops/${restaurantId}/admins`, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -317,7 +317,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.delete(`${this.config.baseUrl}/super-admin/restaurants/${restaurantId}/admins/${adminId}`, {
|
.delete(`${this.config.baseUrl}/super-admin/shops/${restaurantId}/admins/${adminId}`, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
data: {},
|
data: {},
|
||||||
})
|
})
|
||||||
@@ -348,7 +348,7 @@ export class ShopService {
|
|||||||
|
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.post(`${this.config.baseUrl}/super-admin/restaurants/${restaurantId}/admins`, dto, {
|
.post(`${this.config.baseUrl}/super-admin/shops/${restaurantId}/admins`, dto, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
@@ -380,7 +380,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.patch(`${this.config.baseUrl}/super-admin/restaurants/subscription/${subscriptionId}/upgrade`, {
|
.patch(`${this.config.baseUrl}/super-admin/shops/subscription/${subscriptionId}/upgrade`, {
|
||||||
newPlan,
|
newPlan,
|
||||||
subscriptionEndDate
|
subscriptionEndDate
|
||||||
}, {
|
}, {
|
||||||
@@ -412,7 +412,7 @@ export class ShopService {
|
|||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService
|
this.httpService
|
||||||
.delete(`${this.config.baseUrl}/super-admin/restaurants/${id}/hard-delete`, {
|
.delete(`${this.config.baseUrl}/super-admin/shops/${id}/hard-delete`, {
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
data: {},
|
data: {},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user