-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bot): ui for generating bot auth code
- Loading branch information
Showing
5 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
angular.module('anchrClientApp') | ||
.factory('Telegram', ['$resource', function ($resource) { | ||
return { | ||
otp: $resource('/api/telegram/otp', null, { | ||
get: { | ||
method: 'GET', | ||
headers: { 'Accept': 'text/plain' }, | ||
responseType: 'text', | ||
transformResponse: function (data) { | ||
// for some reason, angular keeps converting the string to a json object | ||
// i.e. converts 123456 to { 1: "1", 2: "2", ... } | ||
// this happens event when setting transformResponse to an empty array as suggested at https://docs.angularjs.org/api/ngResource/service/$resource#! | ||
return { otp: data } | ||
} | ||
} | ||
}) | ||
}; | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters