로그 버그 수정
This commit is contained in:
parent
c59bccf805
commit
cc94c5618d
2 changed files with 5 additions and 7 deletions
|
|
@ -109,7 +109,7 @@ class Log {
|
|||
}
|
||||
if (path != null && path!.isNotEmpty) {
|
||||
_writer
|
||||
.start(path!, {'request': _onReadyMessage, 'ready': _onReadyMessage});
|
||||
.start(path!, {'request': _onRequestMessage, 'ready': _onReadyMessage});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,23 +67,21 @@ class SlackSender {
|
|||
|
||||
/// ****************** File Send *******************
|
||||
http.MultipartRequest getPostForm(
|
||||
String url, String channel, String? targetUser) {
|
||||
String url, String channel) {
|
||||
var form = http.MultipartRequest('POST', Uri.parse(url));
|
||||
targetUser = getValidatedUser(targetUser);
|
||||
form.fields['token'] = token;
|
||||
form.fields['channels'] = channel;
|
||||
return form;
|
||||
}
|
||||
|
||||
Future sendFile(String channel, SlackFile file,
|
||||
{String? targetUser,
|
||||
Function(String)? completeListener,
|
||||
{Function(String)? completeListener,
|
||||
Function(Object)? errorListener}) async {
|
||||
var form = getPostForm(urlFileUplaod, channel, targetUser);
|
||||
var form = getPostForm(urlFileUplaod, channel);
|
||||
form = await file.setFileData(form);
|
||||
var response = await form.send();
|
||||
|
||||
var result = await response.stream.bytesToString();
|
||||
print(result);
|
||||
if (response.statusCode < 300 && response.statusCode >= 200) {
|
||||
if (completeListener != null) completeListener(result);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue