fix(frontend): Export python code as string (#1339)

This commit is contained in:
Ádám Kovács
2023-03-31 11:09:53 +02:00
committed by GitHub
parent dfd2abc764
commit 2779891411
7 changed files with 90 additions and 74 deletions
@@ -0,0 +1,14 @@
export default `import wmill
def main():
# A common trigger script would follow this pattern:
# 1. Get the last saved state
# const state = wnmill.get_state()
# 2. Get the actual state from the external service
# const newState = ...
# 3. Compare the two states and update the internal state
# wmill.setState(newState)
# 4. Return the new rows
# return range from (state to newState)
return [1, 2, 3]`