| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import logging |
||
| 2 | from tabpy.tabpy_server.app.SettingsParameters import SettingsParameters |
||
| 3 | from tabpy.tabpy_server.handlers import ManagementHandler |
||
| 4 | import os |
||
| 5 | |||
| 6 | |||
| 7 | _QUERY_OBJECT_STAGING_FOLDER = 'staging' |
||
| 8 | |||
| 9 | |||
| 10 | class UploadDestinationHandler(ManagementHandler): |
||
| 11 | def initialize(self, app): |
||
| 12 | super(UploadDestinationHandler, self).initialize(app) |
||
| 13 | |||
| 14 | def get(self): |
||
| 15 | if self.should_fail_with_not_authorized(): |
||
| 16 | self.fail_with_not_authorized() |
||
| 17 | return |
||
| 18 | |||
| 19 | path = self.settings[SettingsParameters.StateFilePath] |
||
| 20 | path = os.path.join(path, _QUERY_OBJECT_STAGING_FOLDER) |
||
| 21 | self.write({"path": path}) |
||
| 22 |