Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Commit 38292fe

Browse files
fix: broken imports due to change in strapi (#99)
* refactor broken imports * update package info * update package name * fix other broken import * fix(pkg.json): revert changes * fix(santizeOutput): update import * fix: namespace error imports --------- Co-authored-by: daedalus <[email protected]>
1 parent 8943c3f commit 38292fe

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

server/controllers/slug-controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const _ = require('lodash');
4-
const { NotFoundError } = require('@strapi/utils/lib/errors');
4+
const { NotFoundError } = require('@strapi/utils').errors;
55
const { getPluginService } = require('../utils/getPluginService');
66
const { transformResponse } = require('@strapi/strapi/lib/core-api/controller/transform');
77
const { isValidFindSlugParams } = require('../utils/isValidFindSlugParams');

server/utils/hasRequiredModelScopes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ForbiddenError } = require('@strapi/utils/lib/errors');
1+
const { ForbiddenError } = require('@strapi/utils').errors;
22

33
const hasRequiredModelScopes = async (strapi, uid, auth) => {
44
try {

server/utils/isValidFindSlugParams.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ValidationError } = require('@strapi/utils/lib/errors');
1+
const { ValidationError } = require('@strapi/utils').errors;
22
const _ = require('lodash');
33

44
const isValidFindSlugParams = (params) => {

server/utils/sanitizeOutput.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const { contentAPI } = require('@strapi/utils/lib/sanitize');
1+
const { sanitize } = require('@strapi/utils');
22

3-
const sanitizeOutput = (data, contentType, auth) => contentAPI.output(data, contentType, { auth });
3+
const sanitizeOutput = (data, contentType, auth) =>
4+
sanitize.contentAPI.output(data, contentType, { auth });
45

56
module.exports = {
67
sanitizeOutput,

0 commit comments

Comments
 (0)