MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / Delete

Method Delete

component/space_resource.go:118–131  ·  view source on GitHub ↗
(ctx context.Context, id int64)

Source from the content-addressed store, hash-verified

116}
117
118func (c *SpaceResourceComponent) Delete(ctx context.Context, id int64) error {
119 sr, err := c.srs.FindByID(ctx, id)
120 if err != nil {
121 slog.Error("error finding space resource", slog.Any("error", err))
122 return err
123 }
124
125 err = c.srs.Delete(ctx, *sr)
126 if err != nil {
127 slog.Error("error deleting space resource", slog.Any("error", err))
128 return err
129 }
130 return nil
131}

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.80
FindByIDMethod · 0.45

Tested by

no test coverage detected