mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
minor fixes
This commit is contained in:
parent
bfcd119311
commit
6a4a4cc1f9
@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = ({ env }) => ({
|
const { env } = require('@strapi/utils');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
salt: env('API_TOKEN_SALT'),
|
salt: env('API_TOKEN_SALT'),
|
||||||
});
|
};
|
||||||
|
|||||||
@ -94,7 +94,10 @@ describe('API Token', () => {
|
|||||||
|
|
||||||
apiTokenService.createSaltIfNotDefined();
|
apiTokenService.createSaltIfNotDefined();
|
||||||
|
|
||||||
expect(mockedAppendFile).toHaveBeenCalled();
|
expect(mockedAppendFile).toHaveBeenCalledWith(
|
||||||
|
'.env',
|
||||||
|
`API_TOKEN_SALT=${mockedApiToken.hexedString}\n`
|
||||||
|
);
|
||||||
expect(mockedConfigSet).toHaveBeenCalledWith(
|
expect(mockedConfigSet).toHaveBeenCalledWith(
|
||||||
'server.admin.api-token.salt',
|
'server.admin.api-token.salt',
|
||||||
mockedApiToken.hexedString
|
mockedApiToken.hexedString
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user