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