We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b51b6bd commit f02fbfcCopy full SHA for f02fbfc
1 file changed
src/mockserver.js
@@ -111,8 +111,14 @@ async function mockserver() {
111
requestXml.includes('<Surname>')
112
) {
113
const match = requestXml.match('<Surname>(.*?)<');
114
- if(match == 'Carlsson' || match == 'Beckley' || match == 'Nilsson'){
115
- responsePath = 'src/responses/user/' + method + '/' + match + '.xml';
+ if('Carlsson'.includes(match)){
+ responsePath = 'src/responses/user/Carlsson.xml';
116
+ }
117
+ else if('Beckley'.includes(match)){
118
+ responsePath = 'src/responses/user/Beckley.xml';
119
120
+ else if ('Nilsson'.includes(match)){
121
+ responsePath = 'src/responses/user/Nilsson.xml';
122
}
123
else{
124
responsePath = 'src/responses/user/' + method + '.xml';
0 commit comments