Skip to content

Commit e656145

Browse files
committed
Rename /v2/ endpoint to /api/
1 parent c6a9e32 commit e656145

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/src/auth/codelessly_auth_manager.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class CodelesslyAuthManager extends AuthManager {
370370
// Make a POST request to the server to verify the token.
371371
final Response result = await post(
372372
Uri.parse(
373-
'${config.firebaseCloudFunctionsBaseURL}/v2/verifyProjectAuthToken'),
373+
'${config.firebaseCloudFunctionsBaseURL}/api/verifyProjectAuthToken'),
374374
headers: <String, String>{
375375
'Content-Type': 'application/json',
376376
'Authorization': 'Bearer $userToken',
@@ -412,7 +412,7 @@ class CodelesslyAuthManager extends AuthManager {
412412
largePrint: true,
413413
);
414414
}
415-
} catch (e,stacktrace) {
415+
} catch (e, stacktrace) {
416416
logger.log(
417417
label,
418418
'Error trying to authenticate token.\nError: $e',

lib/src/data/web_data_repository.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class WebDataRepository extends NetworkDataRepository {
2424
}) async* {
2525
final Response result = await post(
2626
Uri.parse(
27-
'${config.firebaseCloudFunctionsBaseURL}/v2/getPublishModelRequest'),
27+
'${config.firebaseCloudFunctionsBaseURL}/api/getPublishModelRequest'),
2828
headers: <String, String>{'Content-Type': 'application/json'},
2929
body: jsonEncode({
3030
'projectID': projectID,
@@ -56,7 +56,7 @@ class WebDataRepository extends NetworkDataRepository {
5656
}) async {
5757
final Response result = await post(
5858
Uri.parse(
59-
'${config.firebaseCloudFunctionsBaseURL}/v2/getLayoutModelRequest'),
59+
'${config.firebaseCloudFunctionsBaseURL}/api/getLayoutModelRequest'),
6060
headers: <String, String>{'Content-Type': 'application/json'},
6161
body: jsonEncode({
6262
'projectID': projectID,
@@ -92,7 +92,7 @@ class WebDataRepository extends NetworkDataRepository {
9292
try {
9393
final Response result = await post(
9494
Uri.parse(
95-
'${config.firebaseCloudFunctionsBaseURL}/v2/getFontModelRequest'),
95+
'${config.firebaseCloudFunctionsBaseURL}/api/getFontModelRequest'),
9696
headers: <String, String>{'Content-Type': 'application/json'},
9797
body: jsonEncode({
9898
'projectID': projectID,
@@ -129,7 +129,7 @@ class WebDataRepository extends NetworkDataRepository {
129129
try {
130130
final Response result = await post(
131131
Uri.parse(
132-
'${config.firebaseCloudFunctionsBaseURL}/v2/getPublishedApiRequest'),
132+
'${config.firebaseCloudFunctionsBaseURL}/api/getPublishedApiRequest'),
133133
headers: <String, String>{'Content-Type': 'application/json'},
134134
body: jsonEncode({
135135
'projectID': projectID,
@@ -168,7 +168,7 @@ class WebDataRepository extends NetworkDataRepository {
168168
try {
169169
final Response result = await post(
170170
Uri.parse(
171-
'${config.firebaseCloudFunctionsBaseURL}/v2/getPublishedLayoutVariablesRequest'),
171+
'${config.firebaseCloudFunctionsBaseURL}/api/getPublishedLayoutVariablesRequest'),
172172
headers: <String, String>{'Content-Type': 'application/json'},
173173
body: jsonEncode({
174174
'projectID': projectID,
@@ -209,7 +209,7 @@ class WebDataRepository extends NetworkDataRepository {
209209
try {
210210
final Response result = await post(
211211
Uri.parse(
212-
'${config.firebaseCloudFunctionsBaseURL}/v2/getPublishedLayoutConditionsRequest'),
212+
'${config.firebaseCloudFunctionsBaseURL}/api/getPublishedLayoutConditionsRequest'),
213213
headers: <String, String>{'Content-Type': 'application/json'},
214214
body: jsonEncode({
215215
'projectID': projectID,

0 commit comments

Comments
 (0)