Skip to content

Commit 03f1984

Browse files
author
patched.codes[bot]
committed
Patched main.py
1 parent 9e553e4 commit 03f1984

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from django.http import HttpResponse
2+
from django.views import View
3+
14
import requests
25
import subprocess
36

@@ -21,4 +24,9 @@
2124
command = "ping " + user_input
2225
subprocess.call(command, shell=True)
2326

24-
print("Command executed!")
27+
print("Command executed!")
28+
29+
30+
class HealthCheckView(View):
31+
def get(self, request):
32+
return HttpResponse("ok")

0 commit comments

Comments
 (0)