appwrite/public/scripts/services/console.js

29 lines
922 B
JavaScript
Raw Normal View History

2019-05-09 06:54:39 +00:00
(function (window) {
"use strict";
2019-05-09 08:01:51 +00:00
window.ls.container.set('console', function (window) {
2022-08-02 10:21:31 +00:00
var client = new Appwrite.Client();
var endpoint = window.location.origin + '/v1';
2019-05-09 06:54:39 +00:00
2022-08-02 10:21:31 +00:00
client
.setEndpoint(endpoint)
2019-08-06 05:25:54 +00:00
.setProject('console')
2019-08-06 04:58:32 +00:00
.setLocale(APP_ENV.LOCALE)
2019-08-06 05:25:54 +00:00
;
2019-05-09 06:54:39 +00:00
2022-08-02 10:21:31 +00:00
return {
client: client,
account: new Appwrite.Account(client),
avatars: new Appwrite.Avatars(client),
databases: new Appwrite.Databases(client),
functions: new Appwrite.Functions(client),
health: new Appwrite.Health(client),
locale: new Appwrite.Locale(client),
projects: new Appwrite.Projects(client),
storage: new Appwrite.Storage(client),
teams: new Appwrite.Teams(client),
users: new Appwrite.Users(client)
}
2019-05-09 06:54:39 +00:00
}, true);
})(window);