* Generate and save a token to be used for uploading recordings * * @param {String} token * @return {String}
(token)
| 263 | * @return {String} |
| 264 | */ |
| 265 | function generateToken(token) { |
| 266 | |
| 267 | var token = di.uuid.v4(); |
| 268 | var globalDirPath = getGlobalDirectory(); |
| 269 | var tokenPath = di.path.join(globalDirPath, 'token.txt'); |
| 270 | |
| 271 | di.fs.writeFileSync(tokenPath, token, 'utf8'); |
| 272 | |
| 273 | return token; |
| 274 | |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * Get registered token for uploading recordings |
nothing calls this directly
no test coverage detected