Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdf41b7

Browse files
committed
chore(logging)!: get rid of deprecated api endpoints
1 parent 85e0a1b commit fdf41b7

4 files changed

Lines changed: 0 additions & 53 deletions

File tree

docs/api/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ REST API
1515
files.rst
1616
job.rst
1717
languages.rst
18-
logs.rst
1918
printer.rst
2019
printerprofiles.rst
2120
settings.rst

docs/api/logs.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/octoprint/plugins/logging/static/clientjs/logging.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,8 @@
4343

4444
//~~ wrapper for backwards compatibility
4545

46-
var DeprecatedOctoPrintLogsClient = function (base) {
47-
this.base = base;
48-
this.wrapped = this.base.plugins.logging;
49-
};
50-
51-
DeprecatedOctoPrintLogsClient.prototype.list = function (opts) {
52-
log.warn(
53-
"OctoPrintClient.logs.list has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.listLogs instead"
54-
);
55-
return this.wrapped.listLogs(opts);
56-
};
57-
58-
DeprecatedOctoPrintLogsClient.prototype.delete = function (file, opts) {
59-
log.warn(
60-
"OctoPrintClient.logs.delete has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.deleteLog instead"
61-
);
62-
return this.wrapped.deleteLog(file, opts);
63-
};
64-
65-
DeprecatedOctoPrintLogsClient.prototype.download = function (file, opts) {
66-
log.warn(
67-
"OctoPrintClient.logs.download has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.downloadLog instead"
68-
);
69-
return this.wrapped.downloadLog(file, opts);
70-
};
71-
7246
// register plugin component
7347
OctoPrintClient.registerPluginComponent("logging", OctoPrintLoggingClient);
7448

75-
// also register deprecated client under old endpoint
76-
OctoPrintClient.registerComponent("logs", DeprecatedOctoPrintLogsClient);
77-
7849
return OctoPrintLoggingClient;
7950
});

src/octoprint/server/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,17 +2176,6 @@ def joined_dict(*dicts):
21762176
"content_type": "image/gif",
21772177
},
21782178
),
2179-
# deprecated endpoints
2180-
(
2181-
r"/api/logs",
2182-
util.tornado.DeprecatedEndpointHandler,
2183-
{"url": "/plugin/logging/logs"},
2184-
),
2185-
(
2186-
r"/api/logs/(.*)",
2187-
util.tornado.DeprecatedEndpointHandler,
2188-
{"url": "/plugin/logging/logs/{0}"},
2189-
),
21902179
]
21912180

21922181
# additional routes from plugins

0 commit comments

Comments
 (0)