Skip to content

Commit

Permalink
资产登记功能:支持添加新的固定资产信息,包括资产编号、名称、规格、采购日期、采购价格。
Browse files Browse the repository at this point in the history
  • Loading branch information
charging-kuafuai committed Jun 16, 2024
1 parent 63a1540 commit 062c0b6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
import os
from app.routes import add_asset
from flask import Flask

app = Flask(__name__)

app.add_url_rule('/api/assets', view_func=add_asset, methods=['POST'])

if __name__ == '__main__':
try:
# Check if build.sh script exists
if os.path.exists('./build.sh'):
# Execute build.sh script
os.system('./build.sh')
else:
raise FileNotFoundError("build.sh script not found")

# Start the Flask application
app.run()
except Exception as e:
print(f"An error occurred: {str(e)}")

0 comments on commit 062c0b6

Please sign in to comment.