@vitnode/blog 1.2.0-canary.23 → 1.2.0-canary.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/modules/admin/admin.module.d.ts +439 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +1 -0
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts +198 -0
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/categories/categories.admin.module.js +1 -0
- package/dist/src/api/modules/{categories → admin/categories}/routes/create.route.d.ts +1 -1
- package/dist/src/api/modules/admin/categories/routes/create.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/create.route.js +1 -0
- package/dist/src/api/modules/{categories → admin/categories}/routes/delete.route.d.ts +1 -1
- package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/delete.route.js +1 -0
- package/dist/src/api/modules/{categories → admin/categories}/routes/edit.route.d.ts +1 -1
- package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/edit.route.js +1 -0
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts +243 -0
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/posts/posts.admin.module.js +1 -0
- package/dist/src/api/modules/{posts → admin/posts}/routes/create.route.d.ts +1 -1
- package/dist/src/api/modules/admin/posts/routes/create.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/create.route.js +1 -0
- package/dist/src/api/modules/{posts → admin/posts}/routes/delete.route.d.ts +1 -1
- package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/delete.route.js +1 -0
- package/dist/src/api/modules/{posts → admin/posts}/routes/edit.route.d.ts +1 -1
- package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/edit.route.js +1 -0
- package/dist/src/api/modules/categories/categories.module.d.ts +1 -197
- package/dist/src/api/modules/categories/categories.module.d.ts.map +1 -1
- package/dist/src/api/modules/categories/categories.module.js +1 -1
- package/dist/src/api/modules/categories/routes/get.route.d.ts +1 -1
- package/dist/src/api/modules/posts/posts.module.d.ts +5 -246
- package/dist/src/api/modules/posts/posts.module.d.ts.map +1 -1
- package/dist/src/api/modules/posts/posts.module.js +1 -1
- package/dist/src/api/modules/posts/routes/get.route.d.ts +5 -5
- package/dist/src/app_admin/blog/categories/page.d.ts +5 -1
- package/dist/src/app_admin/blog/categories/page.d.ts.map +1 -1
- package/dist/src/app_admin/blog/categories/page.js +1 -1
- package/dist/src/app_admin/blog/posts/page.d.ts +5 -1
- package/dist/src/app_admin/blog/posts/page.d.ts.map +1 -1
- package/dist/src/app_admin/blog/posts/page.js +1 -1
- package/dist/src/config.api.d.ts.map +1 -1
- package/dist/src/config.api.js +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts.map +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.js +1 -1
- package/dist/src/views/admin/categories/row-actions/delete/delete-action.d.ts.map +1 -1
- package/dist/src/views/admin/categories/row-actions/delete/delete-action.js +1 -1
- package/dist/src/views/admin/categories/row-actions/delete/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/categories/row-actions/delete/mutation-api.js +1 -1
- package/dist/src/views/admin/categories/row-actions/edit-action.d.ts +1 -1
- package/dist/src/views/admin/categories/row-actions/edit-action.d.ts.map +1 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts +1 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.js +1 -1
- package/dist/src/views/admin/posts/row-actions/delete/delete-action.d.ts.map +1 -1
- package/dist/src/views/admin/posts/row-actions/delete/delete-action.js +1 -1
- package/dist/src/views/admin/posts/row-actions/delete/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/posts/row-actions/delete/mutation-api.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/app_admin/blog/categories/page.tsx +11 -3
- package/src/app_admin/blog/posts/page.tsx +11 -2
- package/dist/src/api/modules/categories/routes/create.route.d.ts.map +0 -1
- package/dist/src/api/modules/categories/routes/create.route.js +0 -1
- package/dist/src/api/modules/categories/routes/delete.route.d.ts.map +0 -1
- package/dist/src/api/modules/categories/routes/delete.route.js +0 -1
- package/dist/src/api/modules/categories/routes/edit.route.d.ts.map +0 -1
- package/dist/src/api/modules/categories/routes/edit.route.js +0 -1
- package/dist/src/api/modules/posts/routes/create.route.d.ts.map +0 -1
- package/dist/src/api/modules/posts/routes/create.route.js +0 -1
- package/dist/src/api/modules/posts/routes/delete.route.d.ts.map +0 -1
- package/dist/src/api/modules/posts/routes/delete.route.js +0 -1
- package/dist/src/api/modules/posts/routes/edit.route.d.ts.map +0 -1
- package/dist/src/api/modules/posts/routes/edit.route.js +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare const postsModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "posts", [{
|
|
2
|
-
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global
|
|
2
|
+
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global.middleware").EnvVitNode, "/", {
|
|
3
3
|
in: {
|
|
4
4
|
query: {
|
|
5
5
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
6
|
+
categoryId?: string | undefined;
|
|
6
7
|
cursor?: string | undefined;
|
|
7
8
|
first?: string | undefined;
|
|
8
9
|
last?: string | undefined;
|
|
9
10
|
order?: "asc" | "desc" | undefined;
|
|
10
|
-
categoryId?: string | undefined;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
out: {
|
|
14
14
|
query: {
|
|
15
15
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
16
|
+
categoryId?: number | undefined;
|
|
16
17
|
cursor?: string | undefined;
|
|
17
18
|
first?: string | undefined;
|
|
18
19
|
last?: string | undefined;
|
|
19
20
|
order?: "asc" | "desc" | undefined;
|
|
20
|
-
categoryId?: number | undefined;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
@@ -59,18 +59,18 @@ export declare const postsModule: import("@vitnode/core/api/lib/module").BuildMo
|
|
|
59
59
|
categoryId: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
|
|
60
60
|
}, "strip", import("zod").ZodTypeAny, {
|
|
61
61
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
62
|
+
categoryId?: number | undefined;
|
|
62
63
|
cursor?: string | undefined;
|
|
63
64
|
first?: string | undefined;
|
|
64
65
|
last?: string | undefined;
|
|
65
66
|
order?: "asc" | "desc" | undefined;
|
|
66
|
-
categoryId?: number | undefined;
|
|
67
67
|
}, {
|
|
68
68
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
69
|
+
categoryId?: string | undefined;
|
|
69
70
|
cursor?: string | undefined;
|
|
70
71
|
first?: string | undefined;
|
|
71
72
|
last?: string | undefined;
|
|
72
73
|
order?: "asc" | "desc" | undefined;
|
|
73
|
-
categoryId?: string | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
};
|
|
76
76
|
responses: {
|
|
@@ -203,246 +203,5 @@ export declare const postsModule: import("@vitnode/core/api/lib/module").BuildMo
|
|
|
203
203
|
} & {
|
|
204
204
|
getRoutingPath: () => "/";
|
|
205
205
|
};
|
|
206
|
-
}, {
|
|
207
|
-
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global/global").EnvVitNode, "/", {
|
|
208
|
-
in: {
|
|
209
|
-
json: {
|
|
210
|
-
title: string;
|
|
211
|
-
content: string;
|
|
212
|
-
categoryId: number;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
out: {
|
|
216
|
-
json: {
|
|
217
|
-
title: string;
|
|
218
|
-
content: string;
|
|
219
|
-
categoryId: number;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
223
|
-
id: number;
|
|
224
|
-
title: string;
|
|
225
|
-
createdAt: string;
|
|
226
|
-
updatedAt: string;
|
|
227
|
-
titleSeo: string;
|
|
228
|
-
content: string;
|
|
229
|
-
categoryId: number;
|
|
230
|
-
}, 201, "json">>;
|
|
231
|
-
pluginId: "@vitnode/blog";
|
|
232
|
-
route: {
|
|
233
|
-
method: "post";
|
|
234
|
-
path: "/";
|
|
235
|
-
request: {
|
|
236
|
-
body: {
|
|
237
|
-
content: {
|
|
238
|
-
'application/json': {
|
|
239
|
-
schema: import("zod").ZodObject<{
|
|
240
|
-
title: import("zod").ZodString;
|
|
241
|
-
content: import("zod").ZodString;
|
|
242
|
-
categoryId: import("zod").ZodNumber;
|
|
243
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
244
|
-
title: string;
|
|
245
|
-
content: string;
|
|
246
|
-
categoryId: number;
|
|
247
|
-
}, {
|
|
248
|
-
title: string;
|
|
249
|
-
content: string;
|
|
250
|
-
categoryId: number;
|
|
251
|
-
}>;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
responses: {
|
|
257
|
-
201: {
|
|
258
|
-
content: {
|
|
259
|
-
'application/json': {
|
|
260
|
-
schema: import("zod").ZodObject<{
|
|
261
|
-
id: import("zod").ZodNumber;
|
|
262
|
-
title: import("zod").ZodString;
|
|
263
|
-
titleSeo: import("zod").ZodString;
|
|
264
|
-
content: import("zod").ZodString;
|
|
265
|
-
categoryId: import("zod").ZodNumber;
|
|
266
|
-
createdAt: import("zod").ZodDate;
|
|
267
|
-
updatedAt: import("zod").ZodDate;
|
|
268
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
269
|
-
id: number;
|
|
270
|
-
title: string;
|
|
271
|
-
createdAt: Date;
|
|
272
|
-
updatedAt: Date;
|
|
273
|
-
titleSeo: string;
|
|
274
|
-
content: string;
|
|
275
|
-
categoryId: number;
|
|
276
|
-
}, {
|
|
277
|
-
id: number;
|
|
278
|
-
title: string;
|
|
279
|
-
createdAt: Date;
|
|
280
|
-
updatedAt: Date;
|
|
281
|
-
titleSeo: string;
|
|
282
|
-
content: string;
|
|
283
|
-
categoryId: number;
|
|
284
|
-
}>;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
description: string;
|
|
288
|
-
};
|
|
289
|
-
400: {
|
|
290
|
-
description: string;
|
|
291
|
-
};
|
|
292
|
-
404: {
|
|
293
|
-
description: string;
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
} & {
|
|
297
|
-
getRoutingPath: () => "/";
|
|
298
|
-
};
|
|
299
|
-
}, {
|
|
300
|
-
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global/global").EnvVitNode, "/:id", {
|
|
301
|
-
in: {
|
|
302
|
-
param: {
|
|
303
|
-
id: string;
|
|
304
|
-
};
|
|
305
|
-
};
|
|
306
|
-
out: {
|
|
307
|
-
param: {
|
|
308
|
-
id: number;
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
} & {
|
|
312
|
-
in: {
|
|
313
|
-
json: {
|
|
314
|
-
title: string;
|
|
315
|
-
content: string;
|
|
316
|
-
categoryId: number;
|
|
317
|
-
};
|
|
318
|
-
};
|
|
319
|
-
out: {
|
|
320
|
-
json: {
|
|
321
|
-
title: string;
|
|
322
|
-
content: string;
|
|
323
|
-
categoryId: number;
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
327
|
-
id: number;
|
|
328
|
-
title: string;
|
|
329
|
-
titleSeo: string;
|
|
330
|
-
content: string;
|
|
331
|
-
categoryId: number;
|
|
332
|
-
createdAt: string;
|
|
333
|
-
updatedAt: string;
|
|
334
|
-
}, 400 | 200 | 404, "json">>;
|
|
335
|
-
pluginId: "@vitnode/blog";
|
|
336
|
-
route: {
|
|
337
|
-
method: "put";
|
|
338
|
-
path: "/{id}";
|
|
339
|
-
request: {
|
|
340
|
-
params: import("zod").ZodObject<{
|
|
341
|
-
id: import("zod").ZodEffects<import("zod").ZodString, number, string>;
|
|
342
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
343
|
-
id: number;
|
|
344
|
-
}, {
|
|
345
|
-
id: string;
|
|
346
|
-
}>;
|
|
347
|
-
body: {
|
|
348
|
-
content: {
|
|
349
|
-
'application/json': {
|
|
350
|
-
schema: import("zod").ZodObject<{
|
|
351
|
-
title: import("zod").ZodString;
|
|
352
|
-
content: import("zod").ZodString;
|
|
353
|
-
categoryId: import("zod").ZodNumber;
|
|
354
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
355
|
-
title: string;
|
|
356
|
-
content: string;
|
|
357
|
-
categoryId: number;
|
|
358
|
-
}, {
|
|
359
|
-
title: string;
|
|
360
|
-
content: string;
|
|
361
|
-
categoryId: number;
|
|
362
|
-
}>;
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
|
-
};
|
|
366
|
-
};
|
|
367
|
-
responses: {
|
|
368
|
-
200: {
|
|
369
|
-
content: {
|
|
370
|
-
'application/json': {
|
|
371
|
-
schema: import("zod").ZodObject<{
|
|
372
|
-
id: import("zod").ZodNumber;
|
|
373
|
-
title: import("zod").ZodString;
|
|
374
|
-
titleSeo: import("zod").ZodString;
|
|
375
|
-
content: import("zod").ZodString;
|
|
376
|
-
categoryId: import("zod").ZodNumber;
|
|
377
|
-
createdAt: import("zod").ZodDate;
|
|
378
|
-
updatedAt: import("zod").ZodDate;
|
|
379
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
380
|
-
id: number;
|
|
381
|
-
title: string;
|
|
382
|
-
createdAt: Date;
|
|
383
|
-
updatedAt: Date;
|
|
384
|
-
titleSeo: string;
|
|
385
|
-
content: string;
|
|
386
|
-
categoryId: number;
|
|
387
|
-
}, {
|
|
388
|
-
id: number;
|
|
389
|
-
title: string;
|
|
390
|
-
createdAt: Date;
|
|
391
|
-
updatedAt: Date;
|
|
392
|
-
titleSeo: string;
|
|
393
|
-
content: string;
|
|
394
|
-
categoryId: number;
|
|
395
|
-
}>;
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
description: string;
|
|
399
|
-
};
|
|
400
|
-
400: {
|
|
401
|
-
description: string;
|
|
402
|
-
};
|
|
403
|
-
404: {
|
|
404
|
-
description: string;
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
} & {
|
|
408
|
-
getRoutingPath: () => "/:id";
|
|
409
|
-
};
|
|
410
|
-
}, {
|
|
411
|
-
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global/global").EnvVitNode, "/:id", {
|
|
412
|
-
in: {
|
|
413
|
-
param: {
|
|
414
|
-
id: string;
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
out: {
|
|
418
|
-
param: {
|
|
419
|
-
id: number;
|
|
420
|
-
};
|
|
421
|
-
};
|
|
422
|
-
}>) => Promise<Response & import("hono").TypedResponse<null, 204, "body">>;
|
|
423
|
-
pluginId: "@vitnode/blog";
|
|
424
|
-
route: {
|
|
425
|
-
method: "delete";
|
|
426
|
-
path: "/{id}";
|
|
427
|
-
request: {
|
|
428
|
-
params: import("zod").ZodObject<{
|
|
429
|
-
id: import("zod").ZodEffects<import("zod").ZodString, number, string>;
|
|
430
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
431
|
-
id: number;
|
|
432
|
-
}, {
|
|
433
|
-
id: string;
|
|
434
|
-
}>;
|
|
435
|
-
};
|
|
436
|
-
responses: {
|
|
437
|
-
204: {
|
|
438
|
-
description: string;
|
|
439
|
-
};
|
|
440
|
-
404: {
|
|
441
|
-
description: string;
|
|
442
|
-
};
|
|
443
|
-
};
|
|
444
|
-
} & {
|
|
445
|
-
getRoutingPath: () => "/:id";
|
|
446
|
-
};
|
|
447
206
|
}], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>;
|
|
448
207
|
//# sourceMappingURL=posts.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/posts/posts.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"posts.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/posts/posts.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wRAItB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildModule}from"@vitnode/core/api/lib/module";import{CONFIG_PLUGIN}from"../../../const.js";import{
|
|
1
|
+
import{buildModule}from"@vitnode/core/api/lib/module";import{CONFIG_PLUGIN}from"../../../const.js";import{postsRoute}from"./routes/get.route.js";export const postsModule=buildModule({...CONFIG_PLUGIN,name:"posts",routes:[postsRoute]});
|
|
@@ -48,25 +48,25 @@ export declare const zodPostSchema: z.ZodObject<{
|
|
|
48
48
|
categoryId: number;
|
|
49
49
|
}>;
|
|
50
50
|
export declare const postsRoute: {
|
|
51
|
-
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global
|
|
51
|
+
handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global.middleware").EnvVitNode, "/", {
|
|
52
52
|
in: {
|
|
53
53
|
query: {
|
|
54
54
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
55
|
+
categoryId?: string | undefined;
|
|
55
56
|
cursor?: string | undefined;
|
|
56
57
|
first?: string | undefined;
|
|
57
58
|
last?: string | undefined;
|
|
58
59
|
order?: "asc" | "desc" | undefined;
|
|
59
|
-
categoryId?: string | undefined;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
out: {
|
|
63
63
|
query: {
|
|
64
64
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
65
|
+
categoryId?: number | undefined;
|
|
65
66
|
cursor?: string | undefined;
|
|
66
67
|
first?: string | undefined;
|
|
67
68
|
last?: string | undefined;
|
|
68
69
|
order?: "asc" | "desc" | undefined;
|
|
69
|
-
categoryId?: number | undefined;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
@@ -108,18 +108,18 @@ export declare const postsRoute: {
|
|
|
108
108
|
categoryId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
109
109
|
}, "strip", z.ZodTypeAny, {
|
|
110
110
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
111
|
+
categoryId?: number | undefined;
|
|
111
112
|
cursor?: string | undefined;
|
|
112
113
|
first?: string | undefined;
|
|
113
114
|
last?: string | undefined;
|
|
114
115
|
order?: "asc" | "desc" | undefined;
|
|
115
|
-
categoryId?: number | undefined;
|
|
116
116
|
}, {
|
|
117
117
|
orderBy?: "createdAt" | "updatedAt" | undefined;
|
|
118
|
+
categoryId?: string | undefined;
|
|
118
119
|
cursor?: string | undefined;
|
|
119
120
|
first?: string | undefined;
|
|
120
121
|
last?: string | undefined;
|
|
121
122
|
order?: "asc" | "desc" | undefined;
|
|
122
|
-
categoryId?: string | undefined;
|
|
123
123
|
}>;
|
|
124
124
|
};
|
|
125
125
|
responses: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const CategoriesAdminView: React.LazyExoticComponent<({ searchParams, }: {
|
|
4
|
+
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element>>;
|
|
3
6
|
export declare const generateMetadata: () => Promise<Metadata>;
|
|
4
7
|
export default function CategoriesPage(params: React.ComponentProps<typeof CategoriesAdminView>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
5
9
|
//# sourceMappingURL=page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/blog/categories/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAMrC,OAAO,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/blog/categories/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAMrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,mBAAmB;;uDAIxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,QAAQ,CAMzD,CAAC;AAEF,wBAA8B,cAAc,CAC1C,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,oDAoBzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{I18nProvider}from"@vitnode/core/components/i18n-provider";import{HeaderContent}from"@vitnode/core/components/ui/header-content";import{getTranslations}from"next-intl/server";import{
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{I18nProvider}from"@vitnode/core/components/i18n-provider";import{DataTableSkeleton}from"@vitnode/core/components/table/data-table";import{HeaderContent}from"@vitnode/core/components/ui/header-content";import{getTranslations}from"next-intl/server";import React from"react";import{ActionsCategoriesAdmin}from"../../../views/admin/categories/actions/actions.js";const CategoriesAdminView=React.lazy(async()=>import("../../../views/admin/categories/categories-admin-view.js").then(mod=>({default:mod.CategoriesAdminView})));export const generateMetadata=async()=>{const t=await getTranslations("@vitnode/blog.admin.nav");return{title:t("categories")}};export default async function CategoriesPage(params){const[t,tNav]=await Promise.all([getTranslations("@vitnode/blog.admin.categories"),getTranslations("@vitnode/blog.admin.nav")]);return _jsx(I18nProvider,{namespaces:["@vitnode/blog.admin.categories"],children:_jsxs("div",{className:"p-4",children:[_jsx(HeaderContent,{desc:t("desc"),h1:tNav("categories"),children:_jsx(ActionsCategoriesAdmin,{})}),_jsx(React.Suspense,{fallback:_jsx(DataTableSkeleton,{columns:4}),children:_jsx(CategoriesAdminView,{...params})})]})})}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const PostsAdminView: React.LazyExoticComponent<({ searchParams, }: {
|
|
4
|
+
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element>>;
|
|
3
6
|
export declare const generateMetadata: () => Promise<Metadata>;
|
|
4
7
|
export default function PostsPage(params: React.ComponentProps<typeof PostsAdminView>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
5
9
|
//# sourceMappingURL=page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/blog/posts/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/blog/posts/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAMrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,cAAc;;uDAInB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,QAAQ,CAMzD,CAAC;AAEF,wBAA8B,SAAS,CACrC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,oDAoBpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{I18nProvider}from"@vitnode/core/components/i18n-provider";import{HeaderContent}from"@vitnode/core/components/ui/header-content";import{getTranslations}from"next-intl/server";import{ActionsPostsAdmin}from"../../../views/admin/posts/actions/actions.js";import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{I18nProvider}from"@vitnode/core/components/i18n-provider";import{DataTableSkeleton}from"@vitnode/core/components/table/data-table";import{HeaderContent}from"@vitnode/core/components/ui/header-content";import{getTranslations}from"next-intl/server";import React from"react";import{ActionsPostsAdmin}from"../../../views/admin/posts/actions/actions.js";const PostsAdminView=React.lazy(async()=>import("../../../views/admin/posts/posts-admin-view.js").then(mod=>({default:mod.PostsAdminView})));export const generateMetadata=async()=>{const t=await getTranslations("@vitnode/blog.admin.nav");return{title:t("posts")}};export default async function PostsPage(params){const[t,tNav]=await Promise.all([getTranslations("@vitnode/blog.admin.posts"),getTranslations("@vitnode/blog.admin.nav")]);return _jsx(I18nProvider,{namespaces:["@vitnode/blog.admin.posts"],children:_jsxs("div",{className:"p-4",children:[_jsx(HeaderContent,{desc:t("desc"),h1:tNav("posts"),children:_jsx(ActionsPostsAdmin,{})}),_jsx(React.Suspense,{fallback:_jsx(DataTableSkeleton,{columns:5}),children:_jsx(PostsAdminView,{...params})})]})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,mEAKzB,CAAC"}
|
package/dist/src/config.api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildApiPlugin}from"@vitnode/core/api/lib/plugin";import{CONFIG_PLUGIN}from"./const.js";import{categoriesModule}from"./api/modules/categories/categories.module.js";import{postsModule}from"./api/modules/posts/posts.module.js";export const blogApiPlugin=()=>{return buildApiPlugin({...CONFIG_PLUGIN,modules:[categoriesModule,postsModule]})};
|
|
1
|
+
import{buildApiPlugin}from"@vitnode/core/api/lib/plugin";import{CONFIG_PLUGIN}from"./const.js";import{adminModule}from"./api/modules/admin/admin.module.js";import{categoriesModule}from"./api/modules/categories/categories.module.js";import{postsModule}from"./api/modules/posts/posts.module.js";export const blogApiPlugin=()=>{return buildApiPlugin({...CONFIG_PLUGIN,modules:[adminModule,categoriesModule,postsModule]})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { zodCreateCategorySchema } from '../../../../../api/modules/categories/routes/create.route';
|
|
2
|
+
import type { zodCreateCategorySchema } from '../../../../../api/modules/admin/categories/routes/create.route';
|
|
3
3
|
export declare const CreateEditActionCategoriesAdmin: ({ data, }: {
|
|
4
4
|
data?: z.infer<typeof zodCreateCategorySchema> & {
|
|
5
5
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-edit.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/actions/create-edit/create-edit.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-edit.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/actions/create-edit/create-edit.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAIlG,eAAO,MAAM,+BAA+B,GAAI,WAE7C;IACD,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE,4CAqEA,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { zodCreateCategorySchema } from '../../../../../api/modules/categories/routes/create.route';
|
|
2
|
+
import type { zodCreateCategorySchema } from '../../../../../api/modules/admin/categories/routes/create.route';
|
|
3
3
|
export declare const createMutationApi: (body: z.infer<typeof zodCreateCategorySchema>) => Promise<{
|
|
4
4
|
error: string;
|
|
5
5
|
} | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/actions/create-edit/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/actions/create-edit/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAI/G,eAAO,MAAM,iBAAiB,GAC5B,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC;;cAoB9C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,iBAGnC,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;cAsB1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{
|
|
1
|
+
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{categoriesAdminModule}from"../../../../../api/modules/admin/categories/categories.admin.module.js";export const createMutationApi=async body=>{const res=await fetcher(categoriesAdminModule,{prefixPath:"/admin",method:"post",module:"categories",path:"/",args:{body}});if(res.status!==201){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories","page")};export const editMutationApi=async({id,...body})=>{const res=await fetcher(categoriesAdminModule,{prefixPath:"/admin",method:"put",module:"categories",path:"/{id}",args:{params:{id},body}});if(res.status!==200){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories","page")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-action.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/row-actions/delete/delete-action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-action.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/row-actions/delete/delete-action.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY,GAAI,eAAe;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,4CA0CxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{
|
|
1
|
+
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{ConfirmActionAlertDialog}from"@vitnode/core/components/confirm-action/confirm-action-alert-dialog";import{Button}from"@vitnode/core/components/ui/button";import{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from"@vitnode/core/components/ui/tooltip";import{Trash2Icon}from"lucide-react";import{useTranslations}from"next-intl";import{toast}from"sonner";import{mutationApi}from"./mutation-api.js";export const DeleteAction=({title,id})=>{const t=useTranslations("@vitnode/blog.admin.categories.delete");const tGlobal=useTranslations("core.global");return _jsx(TooltipProvider,{children:_jsxs(Tooltip,{children:[_jsx(ConfirmActionAlertDialog,{description:t.rich("desc",{title:()=>_jsx("span",{className:"text-foreground font-bold",children:title})}),onSubmit:async({onClose})=>{const mutation=await mutationApi(id);if(mutation?.error){toast.error(tGlobal("errors.title"),{description:tGlobal("errors.internal_server_error")});return}toast.success(t("success"),{description:title});onClose()},textSubmit:t("confirm"),title:t("title"),children:_jsx(TooltipTrigger,{asChild:true,children:_jsx(Button,{size:"icon",variant:"destructiveGhost",children:_jsx(Trash2Icon,{className:"size-4"})})})}),_jsx(TooltipContent,{children:t("title")})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/row-actions/delete/mutation-api.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,GAAU,IAAI,MAAM;;
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/categories/row-actions/delete/mutation-api.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,GAAU,IAAI,MAAM;;cAqB3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{
|
|
1
|
+
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{categoriesAdminModule}from"../../../../../api/modules/admin/categories/categories.admin.module.js";export const mutationApi=async id=>{const res=await fetcher(categoriesAdminModule,{prefixPath:"/admin",method:"delete",path:"/{id}",module:"categories",args:{params:{id}}});if(!res.ok){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories","page")};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const CreateEditActionCategoriesAdmin: React.LazyExoticComponent<({ data, }: {
|
|
3
|
-
data?: import("zod").TypeOf<typeof import("../../../../api/modules/categories/routes/create.route").zodCreateCategorySchema> & {
|
|
3
|
+
data?: import("zod").TypeOf<typeof import("../../../../api/modules/admin/categories/routes/create.route").zodCreateCategorySchema> & {
|
|
4
4
|
id: number;
|
|
5
5
|
};
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-action.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/categories/row-actions/edit-action.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,+BAA+B;
|
|
1
|
+
{"version":3,"file":"edit-action.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/categories/row-actions/edit-action.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,+BAA+B;QAEV,CAAC;;;8CAE3B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,OAAO,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,+BAA+B,CAAC,CAAC,4CA+B9E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { zodCreatePostSchema } from '../../../../../api/modules/posts/routes/create.route';
|
|
2
|
+
import type { zodCreatePostSchema } from '../../../../../api/modules/admin/posts/routes/create.route';
|
|
3
3
|
export declare const createMutationApi: (body: z.infer<typeof zodCreatePostSchema>) => Promise<{
|
|
4
4
|
error: string;
|
|
5
5
|
} | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/actions/create-edit/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/actions/create-edit/mutation-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAIzF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC;;cAoB1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,iBAGnC,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;cAsBtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{
|
|
1
|
+
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{postsAdminModule}from"../../../../../api/modules/admin/posts/posts.admin.module.js";export const createMutationApi=async body=>{const res=await fetcher(postsAdminModule,{prefixPath:"/admin",method:"post",module:"posts",path:"/",args:{body}});if(res.status!==201){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts","page")};export const editMutationApi=async({id,...body})=>{const res=await fetcher(postsAdminModule,{prefixPath:"/admin",method:"put",module:"posts",path:"/{id}",args:{params:{id},body}});if(res.status!==200){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts","page")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-action.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/row-actions/delete/delete-action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-action.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/row-actions/delete/delete-action.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY,GAAI,eAAe;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,4CA0CxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{
|
|
1
|
+
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{ConfirmActionAlertDialog}from"@vitnode/core/components/confirm-action/confirm-action-alert-dialog";import{Button}from"@vitnode/core/components/ui/button";import{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from"@vitnode/core/components/ui/tooltip";import{Trash2Icon}from"lucide-react";import{useTranslations}from"next-intl";import{toast}from"sonner";import{mutationApi}from"./mutation-api.js";export const DeleteAction=({title,id})=>{const t=useTranslations("@vitnode/blog.admin.posts.delete");const tGlobal=useTranslations("core.global");return _jsx(TooltipProvider,{children:_jsxs(Tooltip,{children:[_jsx(ConfirmActionAlertDialog,{description:t.rich("desc",{title:()=>_jsx("span",{className:"text-foreground font-bold",children:title})}),onSubmit:async({onClose})=>{const mutation=await mutationApi(id);if(mutation?.error){toast.error(tGlobal("errors.title"),{description:tGlobal("errors.internal_server_error")});return}toast.success(t("success"),{description:title});onClose()},textSubmit:t("confirm"),title:t("title"),children:_jsx(TooltipTrigger,{asChild:true,children:_jsx(Button,{size:"icon",variant:"destructiveGhost",children:_jsx(Trash2Icon,{className:"size-4"})})})}),_jsx(TooltipContent,{children:t("title")})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/row-actions/delete/mutation-api.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,GAAU,IAAI,MAAM;;
|
|
1
|
+
{"version":3,"file":"mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/admin/posts/row-actions/delete/mutation-api.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,GAAU,IAAI,MAAM;;cAqB3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{
|
|
1
|
+
"use server";import{fetcher}from"@vitnode/core/lib/fetcher";import{revalidatePath}from"next/cache";import{postsAdminModule}from"../../../../../api/modules/admin/posts/posts.admin.module.js";export const mutationApi=async id=>{const res=await fetcher(postsAdminModule,{prefixPath:"/admin",method:"delete",path:"/{id}",module:"posts",args:{params:{id}}});if(!res.ok){return{error:await res.text()}}revalidatePath("/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts","page")};
|