Skip to content

Commit de259bc

Browse files
committed
renumber approvals
1 parent 4432ce7 commit de259bc

File tree

442 files changed

+1229
-1229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

442 files changed

+1229
-1229
lines changed

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.10.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ class ApiClient {
77
},
88
body: JSON.stringify(data),
99
});
10+
1011
if (!response.ok) {
1112
throw new Error(`HTTP error! status: ${response.status}`);
1213
}
13-
return response.json();
14+
15+
return await response.json();
1416
}
1517
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.11.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ class ApiClient {
77
},
88
body: JSON.stringify(data),
99
});
10-
return response.json();
10+
if (!response.ok) {
11+
throw new Error(`HTTP error! status: ${response.status}`);
12+
}
13+
return await response.json();
1114
}
1215
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.12.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class ApiClient {
77
},
88
body: JSON.stringify(data),
99
});
10-
const result = await response.json();
11-
return result;
12-
}
10+
return await response.json();
11+
}
12+
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.13.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ class ApiClient {
1010
if (!response.ok) {
1111
throw new Error(`HTTP error! status: ${response.status}`);
1212
}
13-
return await response.json();
14-
}
13+
return response.json();
14+
}
15+
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.14.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class ApiClient {
77
},
88
body: JSON.stringify(data),
99
});
10-
const json = await response.json();
11-
return json;
12-
}
10+
return response.json();
11+
}
12+
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.15.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ class ApiClient {
66
'Content-Type': 'application/json',
77
},
88
body: JSON.stringify(data),
9-
});
9+
});
10+
const result = await response.json();
11+
return result;
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class ApiClient {
2+
async post(endpoint, data) {
3+
const response = await fetch(this.baseUrl + endpoint, {
4+
method: 'POST',
5+
headers: {
6+
'Content-Type': 'application/json',
7+
},
8+
body: JSON.stringify(data),
9+
});
10+
if (!response.ok) {
11+
throw new Error(`HTTP error! status: ${response.status}`);
12+
}
13+
return await response.json();
14+
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.2.txt renamed to src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.17.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ class ApiClient {
33
const response = await fetch(this.baseUrl + endpoint, {
44
method: 'POST',
55
headers: {
6-
'Content-Type': 'application/json'
6+
'Content-Type': 'application/json',
77
},
8-
body: JSON.stringify(data)
8+
body: JSON.stringify(data),
9+
});
10+
const json = await response.json();
11+
return json;
12+
}

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.6.txt renamed to src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.18.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ class ApiClient {
55
headers: {
66
'Content-Type': 'application/json',
77
},
8-
8+
body: JSON.stringify(data),
9+
});

src/test-llm-autocompletion/approvals/api-patterns/rest-api-client.approved.3.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ class ApiClient {
22
async post(endpoint, data) {
33
const response = await fetch(this.baseUrl + endpoint, {
44
method: 'POST',
5-
headers: { 'Content-Type': 'application/json' },
5+
headers: {
6+
'Content-Type': 'application/json'
7+
},
68
body: JSON.stringify(data)

0 commit comments

Comments
 (0)