appwrite / sdk-generator

Generating SDKs for multiple programming languages and platforms ⚙️
https://appwrite.io
MIT License
274 stars 173 forks source link

Fix: Consistently Log ' result ' in API Call Template. #925

Closed ParagGhatage closed 3 months ago

ParagGhatage commented 4 months ago

Summary

This pull request fixes the issue where the console.log statement inconsistently logged the response variable instead of the result variable in the API call template. This ensures that the output is always correct and avoids any confusion that might arise from logging an undefined response variable.

Changes Made

Reason for Changes

The previous implementation had an inconsistency in the variable being logged after an API call. Depending on the method type, the console.log statement sometimes attempted to log an undefined response variable, leading to potential confusion and errors. By consistently logging the result variable, the output remains accurate and predictable.

Related issues

Testing

Impact

This change should have no negative impact on the existing functionality but will improve the clarity and correctness of the logging in the generated code template.

@stnguyen90

stnguyen90 commented 3 months ago

Closing as already addressed via https://github.com/appwrite/sdk-generator/pull/890