mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 04:53:28 +02:00
Screenshot resizing works in the UI now. Still missing rate limiting.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
var util = require('util')
|
||||
var http = require('http')
|
||||
var url = require('url')
|
||||
|
||||
var Promise = require('bluebird')
|
||||
|
||||
module.exports = function(id, options) {
|
||||
module.exports = function(path, options) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
http.get(util.format('%sapi/v1/resources/%s', options.storageUrl, id))
|
||||
http.get(url.resolve(options.storageUrl, path))
|
||||
.on('response', function(res) {
|
||||
if (res.statusCode !== 200) {
|
||||
reject(new Error(util.format('HTTP %d', res.statusCode)))
|
||||
|
||||
Reference in New Issue
Block a user