Skip to content

Commit

Permalink
replace let with const
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Aug 24, 2021
1 parent c1f8f12 commit 2352a48
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/views/docs/functions.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $image = new View(__DIR__.'/../general/image.phtml');
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down
20 changes: 10 additions & 10 deletions app/views/docs/getting-started-for-server.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $kotlinVersion = $versions['kotlin'] ?? '';
<div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = require('node-appwrite');

let client = new sdk.Client();
const client = new sdk.Client();

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down Expand Up @@ -154,7 +154,7 @@ client
<li>
<h3>Deno</h3>
<div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
<pre class="line-numbers"><code class="prism language-typescript" data-prism>let client = new sdk.Client();
<pre class="line-numbers"><code class="prism language-typescript" data-prism>const client = new sdk.Client();

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down Expand Up @@ -246,7 +246,7 @@ val response = account
<div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = require('node-appwrite');

let client = new sdk.Client();
const client = new sdk.Client();

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down Expand Up @@ -300,7 +300,7 @@ client
<li>
<h3>Deno</h3>
<div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
<pre class="line-numbers"><code class="prism language-typescript" data-prism>let client = new sdk.Client();
<pre class="line-numbers"><code class="prism language-typescript" data-prism>const client = new sdk.Client();

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down Expand Up @@ -344,7 +344,7 @@ client
<li>
<h3>Node.js</h3>
<div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let users = new sdk.Users(client);
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const users = new sdk.Users(client);

let promise = users.create('[email protected]', 'password');

Expand Down Expand Up @@ -385,7 +385,7 @@ puts response</code></pre>
<li>
<h3>Deno</h3>
<div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
<pre class="line-numbers"><code class="prism language-typescript" data-prism>let users = new sdk.Users(client);
<pre class="line-numbers"><code class="prism language-typescript" data-prism>const users = new sdk.Users(client);

let promise = users.create('[email protected]', 'password');

Expand Down Expand Up @@ -431,15 +431,15 @@ println(res.body?.string())</code></pre>
<div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = require('node-appwrite');

let client = new sdk.Client();
const client = new sdk.Client();

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;

let users = new sdk.Users(client);
const users = new sdk.Users(client);
let promise = users.create('[email protected]', 'password');

promise.then(function (response) {
Expand Down Expand Up @@ -513,8 +513,8 @@ puts response</code></pre>
<div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
<pre class="line-numbers"><code class="prism language-typescript" data-prism>import * as sdk from "https://deno.land/x/appwrite/mod.ts";

let client = new sdk.Client();
let users = new sdk.Users(client);
const client = new sdk.Client();
const users = new sdk.Users(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
Expand Down
4 changes: 2 additions & 2 deletions app/views/docs/permissions.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<p>In the following example, we are creating a document that can be read by everyone and only be edited, or deleted by a user with a UID <span class="tag">user:5c1f88b42259e</span>.</p>

<div class="ide" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk
.setProject('')
Expand All @@ -129,7 +129,7 @@ promise.then(function (response) {
<p>In the following example, we are creating a document that can be read-only by members of <span class="tag">team:5c1f88b87435e</span> and can only be edited, or deleted by members of the same team that possesses the role <span class="tag">owner</span>.</p>

<div class="ide" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk
.setProject('')
Expand Down
10 changes: 5 additions & 5 deletions app/views/docs/realtime.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $channels = [
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk.subscribe(channel, callback);</code></pre>
</div>
Expand Down Expand Up @@ -71,7 +71,7 @@ realtime.subscribe(channels, callback)</code></pre>
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk.subscribe('account', response => {
// Callback will be executed on all account events.
Expand Down Expand Up @@ -116,7 +116,7 @@ realtime.subscribe("account", callback = { param ->
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk.subscribe(['documents.A', 'files'], response => {
// Callback will be executed on changes for documents A and all files.
Expand Down Expand Up @@ -160,7 +160,7 @@ realtime.subscribe(["documents.A", "files"], callback = { param ->
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

const unsubscribe = sdk.subscribe('files', response => {
// Callback will be executed on changes for all files.
Expand Down Expand Up @@ -314,7 +314,7 @@ subscription()</code></pre>
<li>
<h3>Web</h3>
<div class="ide margin-bottom" data-lang="javascript" data-lang-label="Web SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>let sdk = new Appwrite();
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const sdk = new Appwrite();

sdk.setEndpointRealtime('[ENDPOINT]');</code></pre>
</div>
Expand Down
8 changes: 4 additions & 4 deletions app/views/docs/rules.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ $markdown->setSafeMode(true);
<div class="ide" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>const appwrite = require('node-appwrite');

let client = new appwrite.Client();
let database = new appwrite.Database(client);
const client = new appwrite.Client();
const database = new appwrite.Database(client);

client
.setEndpoint('YOUR_SERVER_ENDPOINT') // http://localhost/v1
Expand Down Expand Up @@ -232,8 +232,8 @@ promise.then(function (response) {

async function boot() {

let client = new appwrite.Client();
let database = new appwrite.Database(client);
const client = new appwrite.Client();
const database = new appwrite.Database(client);

client
.setEndpoint('YOUR_SERVER_ENDPOINT') // http://localhost/v1
Expand Down

0 comments on commit 2352a48

Please sign in to comment.