mirror of https://github.com/openspug/spug
A api update
parent
84a57fe0d9
commit
5af447d3af
|
@ -0,0 +1,9 @@
|
|||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
path('alarm/', AlarmView.as_view()),
|
||||
path('group/', GroupView.as_view()),
|
||||
path('contact/', ContactView.as_view()),
|
||||
]
|
|
@ -20,7 +20,7 @@ class GroupView(View):
|
|||
form, error = JsonParser(
|
||||
Argument('id', type=int, required=False),
|
||||
Argument('name', help='请输入组名'),
|
||||
Argument('contacts', type=list, help='请选择模版类型'),
|
||||
Argument('contacts', type=list, help='请选择联系人'),
|
||||
Argument('desc', required=False)
|
||||
).parse(request.body)
|
||||
if error is None:
|
||||
|
|
|
@ -36,6 +36,7 @@ INSTALLED_APPS = [
|
|||
'apps.exec',
|
||||
'apps.schedule',
|
||||
'apps.monitor',
|
||||
'apps.alarm',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
|
@ -21,4 +21,5 @@ urlpatterns = [
|
|||
path('exec/', include('apps.exec.urls')),
|
||||
path('schedule/', include('apps.schedule.urls')),
|
||||
path('monitor/', include('apps.monitor.urls')),
|
||||
path('alarm/', include('apps.alarm.urls')),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue