api: commit db after mutation