fix
This commit is contained in:
parent
80da74f0e1
commit
b398d7761a
|
@ -76,6 +76,9 @@ Future<void> _postRandomPost() async {
|
|||
if (!File('/data/posts.json').existsSync()) {
|
||||
return;
|
||||
}
|
||||
if (!File('/data/horny.json').existsSync()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool isHorny = false;
|
||||
|
||||
|
@ -116,6 +119,10 @@ void main(List<String> args) async {
|
|||
await File('/data/posts.json').writeAsString(json.encode([]));
|
||||
}
|
||||
|
||||
if (!File('/data/horny.json').existsSync()) {
|
||||
await File('/data/horny.json').writeAsString(json.encode([]));
|
||||
}
|
||||
|
||||
// Import posts from files
|
||||
await _importPosts('/data/posts.txt', 'posts.json');
|
||||
await _importPosts('/data/horny.txt', 'horny.json');
|
||||
|
|
Loading…
Reference in a new issue