mirror of
https://github.com/strapi/strapi.git
synced 2025-07-17 14:02:21 +00:00
26 lines
406 B
JavaScript
26 lines
406 B
JavaScript
const createRq = require('./request');
|
|
|
|
const auth = {
|
|
username: 'admin',
|
|
email: 'admin@strapi.io',
|
|
password: 'pcw123',
|
|
};
|
|
|
|
const rq = createRq();
|
|
|
|
module.exports = {
|
|
auth,
|
|
login: async () => {
|
|
const { body } = await rq({
|
|
url: '/auth/local',
|
|
method: 'POST',
|
|
body: {
|
|
identifier: auth.email,
|
|
password: auth.password,
|
|
},
|
|
});
|
|
|
|
return body;
|
|
},
|
|
};
|